diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc
index 8229059306094d3df7974a0364b4db228b282ba2..e78f0dfa1d604105fee21bfada69b3d9d6bd0c11 100644 (file)
plugin::plugin($config, $dn);
if($this->dn == "new"){
- $this->base = session::global_get('CurrentMainBase');
+ $this->base = session::get('CurrentMainBase');
}else{
$this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn);
new log("view","acl/".get_class($this),$this->dn);
ksort($this->gosaAclTemplate);
/* Extract available categories from plugin info list */
- $tmp= session::global_get('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
$oc = array();
foreach ($plist as $class => $acls){
}
}
- $tmp= session::global_get('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
/* Handle posts */
$new_acl= array();
$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... */
/* Fill in entries */
foreach ($this->gosaAclTemplate as $key => $entry){
- $field1= array("string" => $this->aclTypes[$entry['type']], "attach" => "style='width:100px'");
- $field2= array("string" => $this->assembleAclSummary($entry));
+
+ if($this->acl_is_readable("")){
+ $link = "<a href=?plug=".$_GET['plug']."&id=".$key."&act=edit>".$this->assembleAclSummary($entry)."</a>";
+ }else{
+ $link = $this->assembleAclSummary($entry);
+ }
+
+ $field1= array("string" => $this->aclTypes[$entry['type']], "attach" => "style='width:150px'");
+ $field2= array("string" => $link);
$action ="";
if($this->acl_is_writeable("gosaAclEntry")){
$summary.= "$oc, ";
continue;
}
- if (isset($this->aclContents["$section/$oc"]) && count($this->aclContents["$section/$oc"]) && isset($this->aclContents["$section/$oc"][0]) &&
- $this->aclContents["$section/$oc"][0] != ""){
-
+ if (isset($this->aclContents["$section/$oc"]) && count($this->aclContents["$section/$oc"])){
$summary.= "$oc, ";
continue;
}
function sort_by_priority($list)
{
- $tmp= session::global_get('plist');
+ $tmp= session::get('plist');
$plist= $tmp->info;
asort($plist);
$newSort = array();
/* Refresh users ACL */
$ui= get_userinfo();
$ui->loadACL();
- session::global_set('ui',$ui);
+ session::set('ui',$ui);
}