[pmwiki-users] identify current authorization level
Henrik Bechmann
henrik at bechmannsoftware.com
Wed Jul 26 09:27:48 CDT 2006
Thanks Patrick,
Unfortunately this seems to have the side effect on my system of
rendering the login screen unsuccessful for all attempts (entering a
legitimate password just returns to the password screen -- when I remove
the two lines of code you gave me, all is normal again). Is there
another way?
Thanks,
- Henrik
Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca
Patrick R. Michaud wrote:
> On Thu, Jul 20, 2006 at 03:26:40PM -0400, Henrik Bechmann wrote:
>
>> How do I determine in PHP code if the current user has edit
>> authorization (I don't use UserAuth or AuthUser, just the out-of-the-box
>> password protection.).
>>
>
> In PHP code (i.e., config.php), one can do:
>
>
> $pagename = ResolvePageName($pagename);
> $editauth = (boolean)RetrieveAuthPage($pagename, 'edit', false, READPAGE_CURRENT);
>
> $editauth will be true if the visitor is authorized to edit
> the current page.
>
> Pm
>
>
>
More information about the pmwiki-users
mailing list