org.sakaiproject.hybrid.tool
Class ToolHelperImpl

java.lang.Object
  extended by org.sakaiproject.hybrid.tool.ToolHelperImpl

public class ToolHelperImpl
extends Object

Copied from portal/tags/sakai-2.7.1/portal-impl/impl/src/java/org/sakaiproject/portal/ charon/ToolHelperImpl.java at revision 82452.

Inclusion helps avoid class loader issue with sakai-portal-impl.


Field Summary
protected  org.sakaiproject.authz.api.SecurityService securityService
           
static String TOOLCONFIG_REQUIRED_PERMISSIONS
           
 
Constructor Summary
ToolHelperImpl(org.sakaiproject.authz.api.SecurityService securityService)
           
 
Method Summary
 boolean allowTool(org.sakaiproject.site.api.Site site, org.sakaiproject.tool.api.Placement placement)
          The optional tool configuration tag "functions.require" describes a set of permission lists which decide the visibility of the tool link for this site user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

securityService

protected transient org.sakaiproject.authz.api.SecurityService securityService

TOOLCONFIG_REQUIRED_PERMISSIONS

public static final String TOOLCONFIG_REQUIRED_PERMISSIONS
See Also:
Constant Field Values
Constructor Detail

ToolHelperImpl

public ToolHelperImpl(org.sakaiproject.authz.api.SecurityService securityService)
Parameters:
securityService - Required
Method Detail

allowTool

public boolean allowTool(org.sakaiproject.site.api.Site site,
                         org.sakaiproject.tool.api.Placement placement)
The optional tool configuration tag "functions.require" describes a set of permission lists which decide the visibility of the tool link for this site user. Lists are separated by "|" and permissions within a list are separated by ",". Users must have all the permissions included in at least one of the permission lists. For example, a value like "section.role.student,annc.new|section.role.ta" would let a user with "section.role.ta" see the tool, and let a user with both "section.role.student" AND "annc.new" see the tool, but not let a user who only had "section.role.student" see the tool. If the configuration tag is not set or is null, then all users see the tool.



Copyright © 2009-2012 The Sakai Foundation. All Rights Reserved.