index 912bb29a093b6be9fbadda5f0ff34196a1c82e1a..992f3da004b79c77a9db20bd85d77452b4b13287 100644 (file)
/* Inspect members... */
foreach ($type['members'] as $grp => $grpdsc){
/* Inspect members... */
foreach ($type['members'] as $grp => $grpdsc){
+
/* Some group inside the members that is relevant for us? */
/* Some group inside the members that is relevant for us? */
- if (in_array_ics(preg_replace('/^G:/', '', $grp), $this->groups)){
+ if (in_array_ics(@LDAP::convert(preg_replace('/^G:/', '', $grp)), $this->groups)){
$interresting= TRUE;
}
$interresting= TRUE;
}
$without_self_acl = $all_acl = array();
foreach($this->ACL as $dn => $acl){
$sdn =$dn;
$without_self_acl = $all_acl = array();
foreach($this->ACL as $dn => $acl){
$sdn =$dn;
- while(strpos($dn,",") !== FALSE){
-
+ $first= TRUE; // Run at least once
+ while(strpos($dn,",") !== FALSE || $first){
+ $first = FALSE;
if(isset($this->ACL[$dn])){
$all_acl[$sdn][$dn] = $this->ACL[$dn];
$without_self_acl[$sdn][$dn] = $this->ACL[$dn];
if(isset($this->ACL[$dn])){
$all_acl[$sdn][$dn] = $this->ACL[$dn];
$without_self_acl[$sdn][$dn] = $this->ACL[$dn];
foreach(str_split($newACL) as $char){
foreach(str_split($newACL) as $char){
+ /* Skip "self" ACLs without combination of rwcdm, they have no effect.
+ -self flag without read/write/create/...
+ */
+ if(empty($char)) continue;
+
/* Skip permanent and subtree entries */
if (preg_match('/[sp]/', $acl[$char])){
continue;
/* Skip permanent and subtree entries */
if (preg_match('/[sp]/', $acl[$char])){
continue;