Hi guillaume, thank for your time and tips. I've been on the XWiki api but don't find anything about spaces... http://platform.xwiki.org/xwiki/bin/download/DevGuide/API/xwiki-core-1.7-jav... I think i have to test : SpaceName.WebPreferences.hasAccessLevel("view" , $context.user) Is it correct? I'm going to try this right now. And no problem, i will add my snippet if it works. Guillaume Lerouge a écrit :
Hi Antoine,
On Tue, Dec 16, 2008 at 1:17 AM, antoine Seilles <[email protected]>wrote:
I would like to modify navigation panel to list only spaces for wich a
user has at least the view access level.
How to test the access Level of a user for a space?
A space exists from the moment a page is created in that space. Most of the time, you can check the rights against SpaceName.WebHome or SpaceName.WebPreferences , those are the 2 pages that are the most likely to exist in any given space.
How to get the current user?
$context.user ;-)
Thank for your time.
Please consider adding your snippet on http:/:code.xwiki.org/ once you have it working fine.
Guillaume
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs