[pmwiki-users] Condition on authority to another page

Allister Jenks arj at zkarj.co.nz
Fri Mar 24 22:54:42 CST 2006

On 3/25/06, Tegan Dowling <tmdowling at gmail.com> wrote:
> Some time ago, in another thread, PM said he was considering these:
>  (:if !equal {$PasswdEdit} "":) -- current page has an edit password
>  (:if equal {$PasswdEdit} "@_nopass":) -- edit password is set to
> "@_nopass"
> other built-in authorization groups I'm considering are
>    @_nopass          no password is needed (currently "nopass")
>    @_authid          person is authenticated (currently "id:*")
>    @_edit            use site edit privileges
>    @_admin           locked to all users except admin
>    @_locked          same as @_admin
> I haven't worked with AuthUser since 2.0, so I don't know whether the
> authorization groups or the {$PasswdEdit} variable have been built into the
> script, but if they have been or are, some of this might be useful...
Yikes!  I wondered if I had been clear enough in my description.  Either I
wasn't or I am totally missing what you are saying.  So I will give an
example of what I am wanting to do:

First, there is a page Main.List

On Main.List, there is the following markup


The Main.List page has public read enabled.  Therefore ANY user will see the
list of four links.

Each of the Subscriber group pages, however, has specific (AuthUser) read
authority.  As user 'Bob', I can see all of the contents of Main.List and if
I try to access Issue1 and Issue2 I am successful, but because I do not have
authority to read Issue3 and Issue4, I am unsuccessful in accessing those
pages.  So far, easy.

Now, here's what I want to be able to do on Main.List (syntax invented for
illustrative purposes)

[[Subscriber/Issue1]] (:if !auth Subscriber.Issue1 read:) * (:ifend:)
[[Subscriber/Issue1]] (:if !auth Subscriber.Issue2 read:) * (:ifend:)
[[Subscriber/Issue1]] (:if !auth Subscriber.Issue3 read:) * (:ifend:)
[[Subscriber/Issue1]] (:if !auth Subscriber.Issue4 read:) * (:ifend:)
[=*=]You must pay to access these issues.

So user Bob will see the following:

Issue3 *
Issue4 *

* You must pay to access these issues.

I.e. all the processing occurs in the rendering of Main.List, but
authorities for the current user are checked for the other 4 pages in the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20060325/44413a44/attachment.html 

More information about the pmwiki-users mailing list