From eadd13d48d6457be42e8466b54c215afe25c3ad2 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 27 May 2008 07:36:12 +0000 Subject: [PATCH] Updated ACL class git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11014 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_acl.inc | 28 ---------------------------- gosa-core/include/class_plugin.inc | 8 +++++--- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/gosa-core/include/class_acl.inc b/gosa-core/include/class_acl.inc index 706e0eb02..a595b06a4 100644 --- a/gosa-core/include/class_acl.inc +++ b/gosa-core/include/class_acl.inc @@ -1250,34 +1250,6 @@ class acl extends plugin } } - - function acl_is_writeable($attribute,$skip_write = FALSE) - { - $ui= get_userinfo(); - return preg_match('/w/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), $attribute, $skip_write)); - } - - - function acl_is_readable($attribute) - { - $ui= get_userinfo(); - return preg_match('/r/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), $attribute)); - } - - - function acl_is_createable() - { - - $ui= get_userinfo(); - return preg_match('/c/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), '0')); - } - - - function acl_is_removeable() - { - $ui= get_userinfo(); - return preg_match('/d/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), '0')); - } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/gosa-core/include/class_plugin.inc b/gosa-core/include/class_plugin.inc index f076076ac..4c78534f9 100644 --- a/gosa-core/include/class_plugin.inc +++ b/gosa-core/include/class_plugin.inc @@ -1610,9 +1610,10 @@ class plugin } - function acl_is_createable() + function acl_is_createable($base ="") { $ui= get_userinfo(); + if($base == "") $base = $this->acl_base; return preg_match('/c/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), '0')); } @@ -1624,10 +1625,11 @@ class plugin } - function acl_is_moveable() + function acl_is_moveable($base = "") { $ui= get_userinfo(); - return preg_match('/m/', $ui->get_permissions($this->acl_base, $this->acl_category.get_class($this), '0')); + if($base == "") $base = $this->acl_base; + return preg_match('/m/', $ui->get_permissions($base, $this->acl_category.get_class($this), '0')); } -- 2.30.2