Code

Added logging to acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 May 2007 13:04:28 +0000 (13:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 May 2007 13:04:28 +0000 (13:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6402 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_acl.inc
plugins/admin/acl/class_aclRole.inc

index a8fd374e1f7abacb20e811909ad1b3014abfc88b..99adff3fc05ddffe0743a1e93b897eebe06de24d 100644 (file)
@@ -1032,6 +1032,8 @@ class acl extends plugin
     $this->cleanup();
     $ldap->modify ($this->attrs);
 
+    @log::log("modify","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
     show_ldap_error($ldap->get_error(), sprintf(_("Saving ACLs with dn '%s' failed."),$this->dn));
 
     /* Refresh users ACLs */
@@ -1052,6 +1054,8 @@ class acl extends plugin
     $this->cleanup();
     $ldap->modify ($this->attrs);
 
+    @log::log("remove","acls/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+
     /* Optionally execute a command after we're done */
     $this->handle_post_events("remove",array("uid" => $this->uid));
   }
index cd2728f468d76afaf21515e4b45f73e144e7e8c4..2e6a146dd9da6ac5e2c4dd9346a0a8ddf2414c05 100644 (file)
@@ -42,6 +42,7 @@ class aclrole extends acl
       $this->base = $_SESSION['CurrentMainBase'];
     }else{
       $this->base = preg_replace("/^[^,]+,[^,]+,/","",$this->dn);
+      @log::log("view","aclroles/".get_class($this),$this->dn);
     }
    
     /* Load ACL's */
@@ -551,11 +552,13 @@ class aclrole extends acl
       $ldap->cd($this->dn);
       $this->cleanup();
       $ldap->modify ($this->attrs);
+      @log::log("modify","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }else{
       $ldap->cd($this->config->current['BASE']);
       $ldap->create_missing_trees(preg_replace("/^[^,]+,/","",$this->dn));
       $ldap->cd($this->dn);
       $ldap->add($this->attrs);
+      @log::log("create","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     }
 
     show_ldap_error($ldap->get_error(), sprintf(_("Saving ACLs with dn '%s' failed."),$this->dn));
@@ -594,8 +597,8 @@ class aclrole extends acl
       return;
     }
         
-
     $ldap->rmDir($this->dn);
+    @log::log("remove","aclroles/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
     show_ldap_error($ldap->get_error(), sprintf(_("Removing of aclRole with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */