index 1eb5690b48278ad10261ed41bbc7d8d7f8ce6c09..c1c49ac40ddbb516ffd1e4960795dfe68ff8d0a4 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;
}
}
}
}
/* Remove all acl entries which are especially for the current user (self acl)
*/
/* Remove all acl entries which are especially for the current user (self acl)
*/
- foreach($acl_set['acl'] as $object => $object_acls){
- if(isset($object_acls[0]) && strpos($object_acls[0],"s")){
- unset($without_self_acl[$sdn][$dn][$acl_id]['acl'][$object]);
- }
+ if(isset($acl_set['acl'])){
+ foreach($acl_set['acl'] as $object => $object_acls){
+ if(isset($object_acls[0]) && strpos($object_acls[0],"s")){
+ unset($without_self_acl[$sdn][$dn][$acl_id]['acl'][$object]);
+ }
+ }
}
}
}
}
}
}
/* 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)){
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]);
foreach($this->ACL as $dn => $infos){
foreach($infos as $info){
$found = FALSE;
foreach($this->ACL as $dn => $infos){
foreach($infos as $info){
$found = FALSE;
- foreach($info['acl'] as $cat => $data){
-
- /* Skip self acls? */
- if($skip_self_acls && isset($data['0']) && (strpos($data['0'], "s") !== FALSE)) continue;
- if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
- $found =TRUE;
- break;
- }
- }
+ if(isset($info['acl'])){
+ foreach($info['acl'] as $cat => $data){
+
+ /* Skip self acls? */
+ if($skip_self_acls && isset($data['0']) && (strpos($data['0'], "s") !== FALSE)) continue;
+ if(preg_match("/^".preg_quote($mod, '/')."/",$cat)){
+ $found =TRUE;
+ break;
+ }
+ }
+ }
if($found && !isset($this->config->idepartments[$dn])){
while(!isset($this->config->idepartments[$dn]) && strpos($dn, ",")){
if($found && !isset($this->config->idepartments[$dn])){
while(!isset($this->config->idepartments[$dn]) && strpos($dn, ",")){