X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_acl.inc;h=63a4a24025bae253bd01c1ceeca8341d56021165;hb=2bc36b4f6cc2bcbed445b83e245cc5779ac8c884;hp=c3c411709ba66df23482dcaf87b559a90a011e1e;hpb=96aee585f55d96dd436d8c39df47422e60e5cbb0;p=gosa.git diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index c3c411709..63a4a2402 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -245,6 +245,17 @@ class acl extends plugin $aclDialog= FALSE; $firstedit= FALSE; + /* Act on HTML post and gets here. + */ + if(isset($_GET['id']) && isset($_GET['act']) && $_GET['act'] == "edit"){ + $id = trim($_GET['id']); + $this->dialogState= 'create'; + $firstedit= TRUE; + $this->dialog= TRUE; + $this->currentIndex= $id; + $this->loadAclEntry(); + } + foreach($_POST as $name => $post){ /* Actions... */ @@ -456,9 +467,15 @@ class acl extends plugin if(!$this->acl_is_readable("")) continue; $action =""; + + if($this->acl_is_readable("")){ + $link = "".$this->assembleAclSummary($entry).""; + }else{ + $link = $this->assembleAclSummary($entry); + } $field1= array("string" => $this->aclTypes[$entry['type']], "attach" => "style='width:150px'"); - $field2= array("string" => $this->assembleAclSummary($entry)); + $field2= array("string" => $link); if($this->acl_is_writeable("")){ $action.= "aclContents[$key])){ $this->aclContents[$key]= array(); + } + if(!isset($this->aclContents[$key][0])){ $this->aclContents[$key][0]= ''; } + $currentAcl= $this->aclContents[$key]; /* Get the overall plugin acls @@ -719,24 +739,34 @@ class acl extends plugin $overall_acl = $currentAcl[0]; } + // Detect configured plugins + $expand = count($currentAcl) > 1 || $currentAcl[0] != ""; + /* Object header */ $tname= preg_replace("/[^a-z0-9]/i","_",$name); + + if($expand){ + $back_color = "#C8C8FF"; + }else{ + $back_color = "#C8C8C8"; + } + if(session::global_get('js')) { if(isset($_SERVER['HTTP_USER_AGENT']) && (preg_match("/gecko/i",$_SERVER['HTTP_USER_AGENT'])) || (preg_match("/presto/i",$_SERVER['HTTP_USER_AGENT']))) { $display.= "\n". "\n ". - "\n ". - "\n ". + "\n ". + "\n ". "\n "; } else if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/ie/i",$_SERVER['HTTP_USER_AGENT'])) { $display.= "\n
"._("Object").": $name". - "\n "._("Object").": $name". + "\n
". "\n ". "\n ". "\n ". + "\n ". "\n "; } else { $display.= "\n
"._("Object").": $name". - "\n
". @@ -787,6 +817,8 @@ class acl extends plugin }else{ } } + + foreach($splist as $attr => $dsc){ /* Skip pl* attributes, they are internal... */ @@ -1173,7 +1205,7 @@ class acl extends plugin } if (!$ldap->success()){ - msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class())); + msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()), ERROR_DIALOG); } /* Refresh users ACLs */