summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ff191a)
raw | patch | inline | side by side (parent: 3ff191a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Oct 2008 10:45:29 +0000 (10:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Oct 2008 10:45:29 +0000 (10:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12827 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_userinfo.inc | patch | blob | history |
index 327cb3b1be947e8bd0169bd1d9f3dc914a15d32f..e5ba9c7365cda1dbabc40bcd1f7557984260f1ea 100644 (file)
function get_category_permissions($dn, $category, $any_acl = FALSE)
{
- $ACL_CACHE = &session::get("ACL_CACHE");
- $id = $dn."+".$category."+".$any_acl;
- if(isset($ACL_CACHE['CATEGORY_ACL'][$id])){
- return($ACL_CACHE['CATEGORY_ACL'][$id]);
- }
-
/* If we are forced to skip ACLs checks for the current user
then return all permissions.
*/
return("rwcdm");
}
+ $ACL_CACHE = &session::get("ACL_CACHE");
+ $id = $dn."+".$category."+".$any_acl;
+ if(isset($ACL_CACHE['CATEGORY_ACL'][$id])){
+ return($ACL_CACHE['CATEGORY_ACL'][$id]);
+ }
+
+
/* Get list of objectClasses and get the permissions for it */
$acl= "";
if (isset($this->ocMapping[$category])){
if(!is_array($object)){
$object = array($object);
}
- $r = $w = $c = TRUE;
+ $r = $w = TRUE;
foreach($object as $category){
$w &= preg_match("/w/",$this->has_complete_category_acls($dn, $category));
- $c &= preg_match("/c/",$this->has_complete_category_acls($dn, $category));
$r &= preg_match("/r/",$this->has_complete_category_acls($dn, $category));
-# print_a(array($category => array($r.$w.$c)));
}
return($r && $w );
}
if(!is_array($object)){
$object = array($object);
}
- $r = $w = $c = TRUE;
+ $r = TRUE;
foreach($object as $category){
- $w &= preg_match("/w/",$this->has_complete_category_acls($dn, $category));
- $c &= preg_match("/c/",$this->has_complete_category_acls($dn, $category));
$r &= preg_match("/r/",$this->has_complete_category_acls($dn, $category));
-# print_a(array($category => array($r.$w.$c)));
}
return($r) ;
}