hi Vito, 
hi Ricardo,

 I implemented the code as :
  
#set($user = $xwiki.getUser())
#if($user.isUserInGroup('XWiki.Editors'))
Editor Group
* [Editor's page>Amrita IIS.Editor]
#end  

But I got a really weird error -

Error number 4001 in 4: Error while parsing velocity page Panels.QuickLinks
Wrapped Exception: Encountered "#endrn" at line 26, column 1 of
Panels.QuickLinks
Was expecting one of:
    <EOF> 
    "(" …
    <RPAREN> …
    <ESCAPE_DIRECTIVE> …
    <SET_DIRECTIVE> …
    "##" …
    "\&#34; …
    "
" …
    <TEXT> …
    "#" …
    "#" …
    <STRING_LITERAL> …
    <IF_DIRECTIVE> …
    <STOP_DIRECTIVE> …
    <INTEGER_LITERAL> …
    <FLOATING_POINT_LITERAL> …
    <WORD> …
    <BRACKETED_WORD> …
    <IDENTIFIER> …
    <DOT> …
    "{" …
    "}" ...

I checked everything but it simply would not work...


- Harikrishnan


Ricardo Rodríguez wrote:
> 
> Vitantonio Messa wrote:
>> Hi,
>>
>> it is possible. Instead of checking if the current user has 
>> administrator rights, you can check if he is in the group you want.
>>
>> There was a discussion about that some days ago on the mailing list. 
>> Look for it, if I remember right there was also the code you need.
>>
>> Vito
>>
>>
>>
>> V. Harikrishnan Nair wrote:
>>   
>>> Hi.
>>>
>>>   It is seen that Panel items can be hidden from users other than the
>>> Admins
>>> using this statement -> #if ($xwiki.hasAdminRights()), right ? 
>>>
>>>   Is it possible to be able to display certain Panel items to certain
>>> user
>>> groups ? If so, how ?
>>>
>>> Harikrishnan
>>>     
>>
>>   
> Just to ease the task. To show/hide a panel for the current user:
> 
> #set ($user = $xwiki.getUser())
> #if($user.isUserInGroup("XWiki.YourGroup"))
> ...
> #end
> 
> HTH,
> 
> -- 
> Ricardo Rodríguez
> Your XEN ICT Team
> 
> _______________________________________________
> users mailing list
> users@xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Displaying-Panel-items-tf4749669.html#a13592796
Sent from the XWiki- Users mailing list archive at Nabble.com.

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to