From 348f6d13bb788bd84a1c720df2a5863061d3bbf2 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 8 Mar 2010 10:59:32 +0000 Subject: [PATCH] Allow to use category acls with :self flag in gosa.conf git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@16350 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_pluglist.inc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/gosa-core/include/class_pluglist.inc b/gosa-core/include/class_pluglist.inc index a4440087e..c7350cf60 100644 --- a/gosa-core/include/class_pluglist.inc +++ b/gosa-core/include/class_pluglist.inc @@ -109,13 +109,18 @@ class pluglist { /* Check if the given acl tag is only valid for self acl entries ui->get_permissions($this->ui->dn,$acl_to_check,"") != ""){ - $this->silly_cache[$aclname]= TRUE; - return(TRUE); - } - $this->silly_cache[$aclname]= FALSE; - return(FALSE); + $acl_to_check = preg_replace("/:self$/","",$acl_to_check); + if(strpos($acl_to_check, '/')){ + if($this->ui->get_permissions($this->ui->dn,$acl_to_check,"") != ""){ + $this->silly_cache[$aclname]= TRUE; + return(TRUE); + } + }else{ + if($this->ui->get_category_permissions($this->ui->dn,$acl_to_check,"") != ""){ + $this->silly_cache[$aclname]= TRUE; + return(TRUE); + } + } }else{ /* No self acls. Check if we have any acls for the given ACL type */ -- 2.30.2