From 91b6eb3224b410be65a609e3c8c79d05f3734e13 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 1 Dec 2006 11:34:32 +0000 Subject: [PATCH] Somehow the acl is resetted to 'servRepository' acls. So we need to fetch acls for "FAIclass" in execute() again git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5287 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/systems/class_servRepository.inc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/plugins/admin/systems/class_servRepository.inc b/plugins/admin/systems/class_servRepository.inc index 2277e4793..295fe5214 100644 --- a/plugins/admin/systems/class_servRepository.inc +++ b/plugins/admin/systems/class_servRepository.inc @@ -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(); -- 2.30.2