Code

Updated role editing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Apr 2010 13:56:54 +0000 (13:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 7 Apr 2010 13:56:54 +0000 (13:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17524 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/acl/acl_role.tpl
gosa-core/plugins/admin/acl/class_aclRole.inc

index 2bb63fc8254fc6e1be3eefb38df7e4e89e829c21..8dced0fc834f07d14c4118df14510c60795b4e7b 100644 (file)
@@ -34,7 +34,7 @@
 </tr>
 </table>
 {$aclList}
-{render acl=$gosaAclEntryACL}
+{render acl=$gosaAclTemplateACL}
 <button type='submit' name='new_acl'>{t}New ACL{/t}</button>
 
 {/render}
@@ -53,7 +53,7 @@
 
 <hr>
 <div style='text-align:right;margin-top:5px'>
-{render acl=$gosaAclEntryACL}
+{render acl=$gosaAclTemplateACL}
        <button type='submit' name='submit_new_acl'>{msgPool type=applyButton}</button>
 
        &nbsp;
 
 <h3>{$headline}</h3>
 
-{render acl=$gosaAclEntryACL}
+{render acl=$gosaAclTemplateACL}
 {$aclSelector}
 {/render}
 
 <hr>
 <div style='text-align:right;margin-top:5px'>
-{render acl=$gosaAclEntryACL}
+{render acl=$gosaAclTemplateACL}
        <button type='submit' name='submit_edit_acl'>{msgPool type=applyButton}</button>
 
 {/render}
index 98a6d8c88ce168c15a50eb63618f116f75bf8511..76de3e0cff0bde9175e447220ce60c7d67eb9f95 100644 (file)
@@ -227,9 +227,9 @@ class aclrole extends acl
     // Get listing actions. Delete or Edit.
     $this->list->save_object();
     $lAction = $this->list->getAction();
-    $this->gosaAclEntry = $this->list->getMaintainedData();
+    $this->gosaAclTemplate = array_values($this->list->getMaintainedData());
     if($lAction['action'] == "edit"){
-        $this->currentIndex = $this->list->getKey($lAction['targets'][0]);
+        $this->currentIndex = $lAction['targets'][0];
         $this->dialogState= 'create';
         $firstedit= TRUE;
         $this->dialog= TRUE;
@@ -251,11 +251,6 @@ class aclrole extends acl
         continue;
       }
 
-      if (preg_match('/^acl_del_[0-9]*/', $name) && $this->acl_is_writeable("gosaAclTemplate")){
-        unset($this->gosaAclTemplate[preg_replace('/^acl_del_([0-9]*)$/', '\1', $name)]);
-        continue;
-      }
-
       if (preg_match('/^cat_del_.*/', $name) && $this->acl_is_writeable("gosaAclTemplate")){
         $idx= preg_replace('/^cat_del_(.*)$/', '\1', $name);
         foreach ($this->ocMapping[$idx] as $key){