Caleb and the XWiki community,

Thanks for the response! I wasn't actually aware that this method could take 
groups as parameters, but if you're right, then it really might solve our 
problem! However, given the number of groups that we have on xwiki, it may 
prove a little tedious. Are there any methods that perform these functions:

xwiki.getGroupsWhoHaveAccessToAGivenPage("view,edit, etc",$docname)

or a context method:

context.getGroupsWhoHaveAccessToThisPage("view, edit, etc")

that would allow us to get a list of users back? I haven't heard of a method in 
xwiki that actually returns an array or list, so I may just be hoping for too 
much, but if anyone can think of a way to implement this, then it would be 



----- Original Message ----
From: Caleb James DeLisle <>
To: XWiki Users <>
Sent: Wed, February 17, 2010 1:58:21 AM
Subject: Re: [xwiki-users] Method that returns list of groups for a page

Hello Felix,

I think you're looking for:
$xwiki.hasAccessLevel("edit", "XWiki.SomeUser", "Main.DocumentInQuestion"))


It says users, but I think you can use a group name instead.


Meng Wu wrote:
> Hey all,
> I am trying to find a method that can return a list of groups that have a 
> given access right to a given page. Is there a method(s) that allow me to do 
> that? I'm aware that you can create an object of AccessRights onto a given 
> page and filter in groups and users that have access rights to a given page, 
> but only admins can see that. I need to generate a list of groups that have 
> granted access so that when an unregistered user tries to log onto a page 
> that he doesn't have access to, a list will be generated so that he can ask 
> for membership to those groups. 
> Thank you,
> Felix Wu
> _______________________________________________
> users mailing list

users mailing list


users mailing list

Reply via email to