From a0192f63abf0a3d922e14e2c2baeab4d17ea74f7 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 16 May 2007 13:04:28 +0000 Subject: [PATCH] Added logging to acls git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@6402 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_acl.inc | 4 ++++ plugins/admin/acl/class_aclRole.inc | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/class_acl.inc b/include/class_acl.inc index a8fd374e1..99adff3fc 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -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)); } diff --git a/plugins/admin/acl/class_aclRole.inc b/plugins/admin/acl/class_aclRole.inc index cd2728f46..2e6a146dd 100644 --- a/plugins/admin/acl/class_aclRole.inc +++ b/plugins/admin/acl/class_aclRole.inc @@ -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 */ -- 2.30.2