[dokuwiki] Re: Problems with aclquickcheck, act_permcheck, and related...

  • From: "Terence J. Grant" <tjgrant@xxxxxxxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Mon, 19 Feb 2007 22:28:24 -0500

I've filed a bug for this, as I'm pretty convinced now it's a bug

It should be more to the point:
http://bugs.splitbrain.org/?do=details&id=1084

On 2/14/07, Terence J. Grant <tjgrant@xxxxxxxxxxxx> wrote:
Hello all,

I'm attempting to resolve some issues with ACL permissions for sidebar
stuff and I'm stumped.

aclquickcheck($id) I assume should return the base permissions for $id...

1. Set the page $id as non-readable by ALL, and you get AUTH_READ
returned. However, try to load the page regularly in DokuWiki and you
get the "denied" notice.

2. Further, if memory serves right, if you set the wildcard permission
as non-readable, you get AUTH_NONE.

There is one caveat though, the function returns sensible values if
the $id has create or edit; it returns the proper permission level.

So it appears as if you inherit the default permission for all pages,
rather than the specific permission for the page, if the page is not
editable or create-able.

aclquickcheck calls auth_aclcheck directly so this problem exists here too.

I then found act_permcheck; try act_permcheck('show') and this returns
'denied' like you would expect in this situation, as long as the
current displayed page is the same as the global page $ID. But this is
doesn't really solve the problem as you can only check the current
page.

It appears then this would be more accurate than aclquickcheck if you
had the ability to pass a custom id to act_permcheck; however so far I
am unable to create a similar function to do this... even temporarily
reassigning globals to trick the function doesn't appear to be
working, and I'm stumped.

I'm wondering if I'm using the right functions or if this is simply a bug?

--
--Terence J. Grant



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

Other related posts: