Code

Somehow the acl is resetted to 'servRepository' acls. So we need to fetch acls for...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Dec 2006 11:34:32 +0000 (11:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Dec 2006 11:34:32 +0000 (11:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5287 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servRepository.inc

index 2277e4793883f43f4564f932ff09ee9ba9cbe98d..295fe521418ad438e5403396c23bcb42e02c9767 100644 (file)
@@ -110,8 +110,12 @@ class servrepository extends plugin
        ADD / EDIT Repository
        Dialog Handling
      */
-      
-    $allow_edit = chkacl($this->acl,"FAIclass") == "";
+     
+    $ui = get_userinfo();
+    $tmp= get_permissions ($this->dn, $ui->subtreeACL);
+    $this->acl= get_module_permission($tmp, "FAIclass", $this->dn);
+    $allow_edit = !preg_match("/disabled/i",chkacl($this->acl,"FAIclass"));
+    
 
     $once = false;
     if(isset($_POST['servRepository'])){
@@ -300,6 +304,13 @@ class servrepository extends plugin
 
   function remove_from_parent()
   {
+    /* Skip if not allowed */ 
+    $ui = get_userinfo();
+    $tmp= get_permissions ($this->dn, $ui->subtreeACL);
+    $this->acl= get_module_permission($tmp, "FAIclass", $this->dn);
+
+    if(preg_match("/disabled/",chkacl($this->acl,"FAIclass"))) return;
+
     plugin::remove_from_parent();    
     $ldap= $this->config->get_ldap_link();
     $ldap->cd ($this->config->current['BASE']);
@@ -341,6 +352,10 @@ class servrepository extends plugin
   {
    
     /* Skip if not allowed */ 
+    $ui = get_userinfo();
+    $tmp= get_permissions ($this->dn, $ui->subtreeACL);
+    $this->acl= get_module_permission($tmp, "FAIclass", $this->dn);
+
     if(preg_match("/disabled/",chkacl($this->acl,"FAIclass"))) return;
     plugin::save();