[pmwiki-users] identify current authorization level

Henrik Bechmann henrik at bechmannsoftware.com
Wed Jul 26 20:53:58 CDT 2006


Thanks Hagan,

I copy the lines to farmconfig.php and then I get following page content:

-----------------

Welcome to PmWiki!

A local copy of PmWiki's documentation has been installed along with the 
software, and is available via the documentation index 
<http://localhost/research/wiki/wiki.php?n=PmWiki.DocumentationIndex>.

To continue setting up PmWiki, see initial setup tasks 
<http://localhost/research/wiki/wiki.php?n=PmWiki.InitialSetupTasks>.

The basic editing 
<http://localhost/research/wiki/wiki.php?n=PmWiki.BasicEditing> page 
describes how to create pages in PmWiki. You can practice editing in the 
wiki sandbox <http://localhost/research/wiki/wiki.php?n=Main.WikiSandbox>.

More information about PmWiki is available from http://www.pmwiki.org .

--------------------

<giggle>

When I remove the lines, everything back to normal.

I take it this is a bit tricky! (or I'm missing something...)

Any other ideas?

- Henrik


Henrik Bechmann
www.osscommons.ca
www.bechmannsoftware.com
Webmaster, www.dufferinpark.ca



H. Fox wrote:
> On 7/26/06, Henrik Bechmann <henrik at bechmannsoftware.com> wrote:
>> 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,
>
> Try
>
> $pagename = ResolvePageName($pagename);
> $page = RetrieveAuthPage($pagename, 'read', false, READPAGE_CURRENT);
> if ( @$page['=auth']['edit']) {
>  # Visitor is authorized to edit.
> }
>
> Hagan
>
>




More information about the pmwiki-users mailing list