Re: [xwiki-users] [SPAM] Group identification
Hi Vitantonio, i've tried search the archive, but i didn't find something that could explain it to a novice (especially due to i don't know velocity ) Could you please help me? Thank you!!! ----- Messaggio originale ----- Da: Vitantonio Messa <[email protected]> A: XWiki Users <[email protected]> Inviato: Lunedì 10 dicembre 2007, 11:38:08 Oggetto: Re: [xwiki-users] [SPAM] Group identification [email protected] wrote:
Hi everybody,
I'd like to create in the right pane a link visible only to a certain
group of people (i.e. Group1) similarly to what happen for the admin center link.
How can i do it?
Hi Mattia, you can use some velocity to show the link only to users in a known group. I remember that this was already asked in the past, check on the mailing list archive and you will find your solution ;) Vito -- Vitantonio Messa +358 46 889 48 49 - [email protected] COSS - The Finnish Centre for Open Source Solutions @ Technology Centre Hermia Ltd. Hermiankatu 1, FIN-33720 Tampere, FINLAND _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users ___________________________________ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
[email protected] wrote:
Hi Vitantonio,
i've tried search the archive, but i didn't find something that could explain it to a novice (especially due to i don't know velocity )
Could you please help me?
Thank you!!!
Mattia, first, set the username of the current user: #set ($user = $xwiki.getUser()) then, check if that user is in the group you want: #if ($user.isUserInGroup("Xwiki.XWikiGroupName")) { ...display something... } Hope this will help, I don't have time to check if this work, sorry. Vito -- Vitantonio Messa +358 46 889 48 49 - [email protected] COSS - The Finnish Centre for Open Source Solutions @ Technology Centre Hermia Ltd. Hermiankatu 1, FIN-33720 Tampere, FINLAND
Vitantonio Messa wrote:
[email protected] wrote:
Hi Vitantonio,
i've tried search the archive, but i didn't find something that could explain it to a novice (especially due to i don't know velocity )
Could you please help me?
Thank you!!!
Mattia,
first, set the username of the current user: #set ($user = $xwiki.getUser())
then, check if that user is in the group you want: #if ($user.isUserInGroup("Xwiki.XWikiGroupName")) { ...display something... }
Without {}, actually: #if ($xwiki.getUser().isUserInGroup("XWiki.XWikiGroupName")) ...display something... #end
Hope this will help, I don't have time to check if this work, sorry. Vito
participants (3)
-
mattia_temp-newsgroup@yahoo.it -
Sergiu Dumitriu -
Vitantonio Messa