Hi,
i think the problem is, that space preferences is in
${space}.WebPreferences page and not in WebHome. Your script just find, if
the user have rights to WebHome page not for entire space.
WebPreferences has object global
rights and i think there you have to do some sql query to find out, if
user have rights or not.
Jan
On 12/17/07, Bjørnar Libæk <blibak(a)gmail.com> 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",$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(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users