[dokuwiki] namespace acl check, BUG #1751

  • From: jerry <JerryGeiger@xxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 19 Nov 2009 15:57:16 +0100

While testing a really recursive acl_check routine I found a bug?
feature?
in inc/auth.php:

function auth_aclcheck returns with the first found (user/group) in a
matched namespace and not with the highest permission.

suggested fix:
*** 523,531 ****
                  }
              }
              //we had a match - return it
              return $perm;
          }
- 
          //get next higher namespace
          $ns   = getNS($ns);
  
--- 523,534 ----
                  }
              }
              //we had a match - return it
+             //return $perm;
+         }
+         if($perm > -1){
+           //we had a match - return it
             return $perm;
          }
          //get next higher namespace
          $ns   = getNS($ns);

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts:

  • » [dokuwiki] namespace acl check, BUG #1751 - jerry