[Building Sakai] what is "tool.permission" in method getAuthzGroupsIsAllowed() ?
Stephen Marquard
stephen.marquard at uct.ac.za
Thu Oct 1 22:18:36 PDT 2009
This particular method is more like "search for a list of authzgroups in which this user has a permission".
A typical case would be to get the list of groups in a site, then find out which ones the user can do something in (like create an announcement), by passing the whole list of groups and getting back a subset, or get a list of sites in which the user has a particular permission.
Cheers
Stephen
>>> Steve Swinsburg <steve.swinsburg at gmail.com> 10/2/2009 3:17 AM >>>
Hi Vo,
"tool.permission" will be a specific permission you want to check for,
ie one of the manypermissions that tools register, ie annc.new,
annc.read, content.new etc
Take a look in the Admin > Realms > Role and you'll see the complete
list of registered functions. Essentially you can search for a user
with a specific permission in a site.
cheers,
Steve
On 02/10/2009, at 9:26 AM, Hai Vo Thanh wrote:
> Dear all,
> In the document Sakai Framework Tips > Using the AuthzGroup Service
> http://confluence.sakaiproject.org/display/BOOT/Using+the+AuthzGroup+Service
>
> there is a guide: Getting the list of sites that a user has a
> specific permision in. The sample code has a line:
> java.util.Set authzGroupIds =
> authzGroupService.getAuthzGroupsIsAllowed(userId, "tool.permission",
> null); // (1)
>
> Could you please explain me what is the String "tool.permission" ?
> Can it be replaced by another String?
>
> The prototype of this method is:
> Set getAuthzGroupsIsAllowed(String userId, String function,
> Collection azGroups);
> * @param function
> * The function to check.
>
> I am confused about the "String function", i do not know what it
> really is. Please help me.
> Thanks a million.
> ----
> Vo.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
> with a subject of "unsubscribe"
More information about the sakai-dev
mailing list