summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 819d8bd)
raw | patch | inline | side by side (parent: 819d8bd)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 23 Jun 2008 07:00:50 +0000 (07:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 23 Jun 2008 07:00:50 +0000 (07:00 +0000) |
-The resolving of the ACLs was exactly the same.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11402 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11402 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_userinfo.inc | patch | blob | history |
index 34634669f6820a9cc018ef91773df2f297b9f89b..68df16329fc379e91c59f7e48d215c1d9feda283 100644 (file)
$path= split(',', $dn);
$path= array_reverse($path);
-
/* Walk along the path to evaluate the acl */
$cpath= "";
foreach ($path as $element){
}
}
-
-
/* Search for per object ACLs.
*/
$this->config->get_departments();
/* For all gosaDepartments */
foreach ($this->config->departments as $dn){
- $acl= array("r" => "", "w" => "", "c" => "", "d" => "", "m" => "", "a" => "");
-
- /* Build dn array */
- $path= split(',', $dn);
- $path= array_reverse($path);
-
- /* Walk along the path to evaluate the acl */
- $cpath= "";
- foreach ($path as $element){
-
- /* Clean potential ACLs for each level */
- $acl= $this->cleanACL($acl);
-
- if ($cpath == ""){
- $cpath= $element;
- } else {
- $cpath= $element.','.$cpath;
- }
- if (isset($this->ACL[$cpath])){
-
- /* Inspect this ACL, place the result into ACL */
- foreach ($this->ACL[$cpath] as $subacl){
-
- /* Reset? Just clean the ACL and turn over to the next one... */
- if ($subacl['type'] == 'reset'){
- $acl= $this->cleanACL($acl, TRUE);
- continue;
- }
-
- if($subacl['type'] == 'role'){
- echo "role skipped";
- continue;
- }
-
- /* Per object ACL? */
- foreach ($objects as $object){
- if (isset($subacl['acl']["$module/$object"])){
- foreach($subacl['acl']["$module/$object"] as $attribute => $dcl){
- $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']["$module/$object"][$attribute]);
- }
- }
- }
-
- /* Global ACL? */
- if (isset($subacl['acl']["$module/all"][0])){
- $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']["$module/all"][0]);
- continue;
- }
-
- /* Global ACL? */
- if (isset($subacl['acl']["all"][0])){
- $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']["all"][0]);
- continue;
- }
- }
- }
+ if(!is_array($module)){
+ $module = array($module);
}
-
- /* Add department, if we have (some) permissions for the required module */
- foreach ($acl as $val){
- if ($val != ""){
- $deps[]= $dn;
- break;
+ $acl = "";
+ foreach($module as $mod){
+ if(preg_match("/\//",$mod)){
+ $acl.= $this->get_permissions($dn,$mod,"0");
+ }else{
+ $acl.= $this->get_category_permissions($dn,$mod);
}
}
+ if($acl !== "") $deps[] = $dn;
}
-
+
$ACL_CACHE = &session::get('ACL_CACHE');
$ACL_CACHE['MODULE_DEPARTMENTS'][serialize($module)] = $deps;
return ($deps);