Code

Updated ACL class
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 07:36:12 +0000 (07:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 07:36:12 +0000 (07:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11014 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_acl.inc
gosa-core/include/class_plugin.inc

index 706e0eb0275b3651bfd57c911e76a855f3feb074..a595b06a428efbe0cc8dfb3901b87a5ab311b0f0 100644 (file)
@@ -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:
index f076076acf96cac1e49526d22f9c72ba55eb4a8e..4c78534f9debb7c1b2e7c376bdb6b434983251dd 100644 (file)
@@ -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'));
   }