From 1614974f4859704c1bae1f39fae4300721d2bfdc Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 26 Feb 2009 10:05:39 +0000 Subject: [PATCH] Updated ACL and Role listing -Added edit link to the ACL summary- git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13462 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_acl.inc | 19 ++++++++++++++- gosa-core/plugins/admin/acl/class_aclRole.inc | 23 +++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index c3c411709..2996bc78c 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.= "dialogState= 'create'; + $firstedit= TRUE; + $this->dialog= TRUE; + $this->currentIndex= $id; + $this->loadAclEntry(); + } + foreach($_POST as $name => $post){ /* Actions... */ @@ -364,8 +376,15 @@ class aclrole extends acl /* 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 = "".$this->assembleAclSummary($entry).""; + }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")){ -- 2.30.2