index 336923ac5c4b7f948779c21f6f39aa259f4b981a..dae522f0f46ce28e24e30a023c68fe39c10701a3 100644 (file)
function loadACL()
{
$this->ACL= array();
function loadACL()
{
$this->ACL= array();
+ $this->allACLs= array();
$this->groups= array();
$this->result_cache =array();
$this->reset_acl_cache();
$this->groups= array();
$this->result_cache =array();
$this->reset_acl_cache();
if (preg_match('/^G:\*/', $grp)){
$interresting= TRUE;
}
if (preg_match('/^G:\*/', $grp)){
$interresting= TRUE;
}
+ $this->allACLs[$dn][$idx]= $type;
}
}
}
}
}
$this->ACL[$dn][$idx]= $type;
}
}
$this->ACL[$dn][$idx]= $type;
}
- $this->allACLs[$dn][$idx]= $type;
}
}
}
}
/* Check for correct category and class values... */
if(strpos($object,'/') !== FALSE){
/* Check for correct category and class values... */
if(strpos($object,'/') !== FALSE){
- list($aclCategory, $aclClass) = split("/", $object);
+ list($aclCategory, $aclClass) = preg_split("!/!", $object);
}else{
$aclCategory = $object;
}
}else{
$aclCategory = $object;
}
- if($this->config->get_cfg_value("displayerrors") == "true"){
+ if($this->config->get_cfg_value("displayErrors") == "true"){
if(!isset($this->ocMapping[$aclCategory])){
trigger_error("Invalid ACL category '".$aclCategory."'! ({$object})");
return("");
if(!isset($this->ocMapping[$aclCategory])){
trigger_error("Invalid ACL category '".$aclCategory."'! ({$object})");
return("");
/* Inspect this ACL, place the result into ACL */
foreach ($ACL[$cpath] as $subacl){
/* Inspect this ACL, place the result into ACL */
foreach ($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;
if($subacl['type'] == "role") {
echo "role skipped";
continue;
}
}
}
}
+ /* Reset? Just clean the ACL and turn over to the next one... */
+ if ($subacl['type'] == 'reset'){
+ $acl= $this->cleanACL($acl, TRUE);
+ continue;
+ }
+
/* Self ACLs?
*/
if($dn != $this->dn && isset($subacl['acl'][$object][0]) && (strpos($subacl['acl'][$object][0],"s") !== FALSE)){
/* Self ACLs?
*/
if($dn != $this->dn && isset($subacl['acl'][$object][0]) && (strpos($subacl['acl'][$object][0],"s") !== FALSE)){
}
/* Global ACL? */
}
/* Global ACL? */
+ if (isset($subacl['acl']['all/all'][0])){
+ $acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']['all/all'][0]);
+ continue;
+ }
+
+ /* Global ACL? - Old style global ACL - Was removed since class_core.inc was created */
if (isset($subacl['acl']['all'][0])){
$acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']['all'][0]);
continue;
if (isset($subacl['acl']['all'][0])){
$acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl']['all'][0]);
continue;
foreach($this->ocMapping[$ocs] as $oc){
if (isset($subacl['acl'][$ocs.'/'.$oc])){
foreach($this->ocMapping[$ocs] as $oc){
if (isset($subacl['acl'][$ocs.'/'.$oc])){
- if($dn != $this->dn && strpos($subacl['acl'][$ocs.'/'.$oc][0],"s") !== FALSE) continue;
+ // Skip ACLs wich are defined for ourselfs only - if not checking against ($ui->dn)
+ if(isset($subacl['acl'][$ocs.'/'.$oc][0]) &&
+ $dn != $this->dn &&
+ strpos($subacl['acl'][$ocs.'/'.$oc][0],"s") !== FALSE) continue;
foreach($subacl['acl'][$ocs.'/'.$oc] as $attr => $dummy){
$acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl'][$ocs.'/'.$oc][$attr]);
foreach($subacl['acl'][$ocs.'/'.$oc] as $attr => $dummy){
$acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl'][$ocs.'/'.$oc][$attr]);
}
}
}else{
}
}
}else{
- if($this->config->get_cfg_value("displayerrors") == "true"){
+ if($this->config->get_cfg_value("displayErrors") == "true"){
trigger_error("Invalid type of category ".$category);
}
$acl = "";
trigger_error("Invalid type of category ".$category);
}
$acl = "";