[xwiki-users] rights of current user
Sergiu Dumitriu
sergiu at xwiki.com
Mon Dec 17 17:14:51 CET 2007
Bjørnar Libæk wrote:
> I would like to have a script that finds out for which spaces the
> current user has view rights. I try to do:
>
> #set($spaces = $xwiki.spaces)
> #foreach($space in $spaces)
> #set($whome = $xwiki.getDocument("${space}.WebHome"))
> [$space>${space}.WebHome]
#if($whome.hasAccessLevel("view",$context.getUser()))
> #if($whome.hasAccessLevel("view",$xwiki.getUser()))
> acess? Yup<br>
> #else
> access? Nope<br>
> #end
> #end
>
> but hasAccessLevel always return false. What am I missing? Is there any
> other way to do this?
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> users mailing list
> users at xwiki.org
> http://lists.xwiki.org/mailman/listinfo/users
More information about the users
mailing list