[pmwiki-users] Default group with authentication

Jiri Hladůvka / OBUTEX admin at obutex.com
Thu Mar 1 02:17:34 CST 2007


Use AuthUser recipe.
1) edit Site/AuthUser and insert the users and groups of users e.g.
Adams: (:encrypt AdamsPassword:)

2) create group for each user e.g. Adams/Adams and set the read password
in Adams/GroupAttributes?action=attr to id:Adams

3) When Adams log in then the variable {$AuthId} has a value "Adams"

4) The link [[{$AuthId}/SomePage]] leads to SomePage in the group named 
as logged in user

4a) use such a link for logedin users ONLY
(:if  equal {$AuthId} "":) [[{$PageUrl}?action=login|Login please]]
(:if  !equal {$AuthId} "":)[[{$AuthId}/SomePage]] (:ifend:)

The first line displayes link to log in; after the users logs in the 
same page ( {$PageUrl} )is displayed
and the link to SomePage] appears.

You can do similar with Profiles/{$AuthId} etc.

Hope this helps,
regards,
Jiri



Keith Edmunds napsal(a):
> I'm new to pmwiki, so apologies if this is a naive question.
>
> I'm considering using pmwiki as a CMS, and have read the recipes about
> doing so. One feature I want is for there to be a consistent menu for
> all authenticated users, but for the actual page linked to for each
> menu item to be unique per group of users. For example, there might be
> a 'my page' link for all authenticated users, but the page displayed
> will depend on which user is logged in.
>
> I think I can do that with groups, and I also think that I can prevent
> users in group X seeing the 'my page' page for group Y - is that
> correct?
>
> My real question, however, is can I set up a default group for each
> user, so that when I display the menu, I can say "this is user Smith,
> who has a default group is X, therefore the destination for the
> menu item 'my page' is X/mypage"? Or maybe at authentication I should
> make the default group (for user Smith) be X - is that straightforward
> to do (and sensible)?
>
> If the above isn't clear, let me know and I'll try to clarify.
>
> Thanks,
> Keith
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
> __________ Informace od NOD32 2085 (20070228) __________
>
> Tato zprava byla proverena antivirovym systemem NOD32.
> http://www.nod32.cz
>
>
>
>   

-- 
OBUTEX s.r.o
Ing.Jiří Hladůvka
Zlatovská 22
911 01 Trenčín

tel.: +421 (0)32 6587000
mailto:admin at obutex.com

http://www.obutex.com





More information about the pmwiki-users mailing list