summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 55af051)
raw | patch | inline | side by side (parent: 55af051)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jul 2008 13:30:32 +0000 (13:30 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 1 Jul 2008 13:30:32 +0000 (13:30 +0000) |
-Only display Shares we are allowed to view.
-If a share is selected which we are not allowed to view, then display it, so we will ensure that it stays selected after saving.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11499 594d385d-05f5-0310-b6e9-bd551577e9d8
-If a share is selected which we are not allowed to view, then display it, so we will ensure that it stays selected after saving.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11499 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/personal/environment/class_environment.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc
index 21ecc93f1c30e79d147cb8f5ffebc383bf37ab4a..a19bb719f9654600ca2e5c2cbe60a92ee93a0ee2 100644 (file)
function update_kiosk_profiles()
{
+ $this->gotoKioskProfile_Server = preg_replace("/^.*:\/\/([^\/]*).*$/","\\1",$this->gotoKioskProfile);
+ $this->gotoKioskProfile_Profile= preg_replace("/^.*\//","",$this->gotoKioskProfile);
+
$tmp1 = array("none" => array(_("disabled")));
$tmp2 = array("none" => _("disabled"));
$tmp3 = array();
$ldap->cd($this->config->current['BASE']);
$ldap->search("(&(objectClass=goEnvironmentServer)(gotoKioskProfile=*)(cn=*))",array("cn","gotoKioskProfile"));
$cnt = 0;
+ $ui = get_userinfo();
while($attrs = $ldap->fetch()){
+ $acl = $ui->get_permissions($attrs['dn'],"server/goShareServer","");
for($i = 0 ; $i < $attrs['gotoKioskProfile']['count'] ; $i ++){
- $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
- $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
- $tmp1[$attrs['cn'][0]][] = $name;
- $tmp3[$attrs['cn'][0]][$name] = $attrs['gotoKioskProfile'][$i];
+ if(preg_match("/r/",$acl) || $this->gotoKioskProfile_Server == $attrs['cn'][0]){
+ $name = preg_replace("/^.*\//","",$attrs['gotoKioskProfile'][$i]);
+ $tmp1[$attrs['cn'][0]][] = $name;
+ $tmp3[$attrs['cn'][0]][$name] = $attrs['gotoKioskProfile'][$i];
+ $tmp2[$attrs['cn'][0]]= $attrs['cn'][0];
+ $cnt ++;
+ }
}
- $tmp2[$attrs['cn'][0]]= $attrs['cn'][0];
- $cnt ++;
}
if($cnt && $this->config->search("environment","kioskpath",array('menu','tabs'))){
$this->gotoKioskProfiles['SERVERS'] = $tmp2;
$this->gotoKioskProfiles['MAP'] = $tmp3;
- $this->gotoKioskProfile_Server = preg_replace("/^.*:\/\/([^\/]*).*$/","\\1",$this->gotoKioskProfile);
- $this->gotoKioskProfile_Profile= preg_replace("/^.*\//","",$this->gotoKioskProfile);
-
$error = false;
if(!isset($this->gotoKioskProfiles['SERVERS'][$this->gotoKioskProfile_Server])){
$error = true;