[dokuwiki] AW: Re: Problem with auth_quickaclcheck()

  • From: "Frank" <frank.hinkel@xxxxxxxxx>
  • To: <dokuwiki@xxxxxxxxxxxxx>
  • Date: Tue, 8 Aug 2006 22:12:57 +0200

Ok, found the error for myself. Sorry for my fast posting to the mailing
list.

 I played around with the acl_auth.php file and noticed two issues:

1.) The $ID passed to the auth_quickaclcheck() has to be all lowercase !
2.) The leading colon ":" in the namespace of the $ID seems also to be a
problem.

After "lowercasing" and trimming leading and trailing colons, the
authentification works as expected.

In  my example below ":calendar:Maike" gets "calendar:maike" and this works
fine.

Snippet:

    $allowed_pages = array();
    foreach($pages as $page)
    {
      $perm = auth_quickaclcheck(trim(strtolower($page),":"));
      if ($perm < AUTH_READ) continue; # to next page
      $allowed_pages[] = $page;
    }

Best wishes, Frank

-----Ursprüngliche Nachricht-----
Von: dokuwiki-bounce@xxxxxxxxxxxxx [mailto:dokuwiki-bounce@xxxxxxxxxxxxx]Im
Auftrag von Andreas Gohr
Gesendet: Dienstag, 8. August 2006 15:22
An: dokuwiki@xxxxxxxxxxxxx
Betreff: [dokuwiki] Re: Problem with auth_quickaclcheck()


Frank writes:

> When I go to [[:calendar:Maike]] I get a "permission denied" message. But
my
> Script gets $perm=8 !?! So the page is included in the calendar although I
> have no permission to see this page.

Can you post the (relevant or all) contents of your acl.auth.php file?
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist


--
No virus in incoming mail. Kein Virus in eingehender Email.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.7/411 - Release Date: 07.08.2006

--
No virus found in this outgoing message. Kein Virus in ausgehender Email
gefunden.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.7/411 - Release Date: 07.08.2006

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

Other related posts: