[pmwiki-users] conditional markup for AuthUser groups
Guillermo Calderon - INCO
calderon at fing.edu.uy
Tue Sep 11 14:36:23 CDT 2007
Christophe David wrote:
> When you have in SiteAdmin.AuthUser
>
> user1: hash1
> user2: hash2
> user3: hash3
> user4: hash4
>
> @group1: user2, user3
> @group2: user1, user4
> @group3: user1, user2, user3
>
> is there a way to create a conditional markup like (:if auth read:) to
> check if the user is member of a group:
>
> Something like :
>
> (:if MemberOfAuthUserGroup @group2:)
> ...
> (:ifend:)
>
>
> Thank you in anticipation.
>
> Christophe
pm wrote (at pmwiki-devel list) :
I think I would go with:
$Conditions['authgroup'] = '$GLOBALS["AuthList'][$condparm] > 0';
and then an author can write:
(:if authgroup @editors:)
and even
(:if authgroup id:alice :)
The next step, of course, would be to have a way to specify multiple
values, as in:
(:if authgroup @editors, at authors,id:alice :)
Pm
More information about the pmwiki-users
mailing list