org.apache.click.extras.security
Class RoleAccessController
java.lang.Object
org.apache.click.extras.security.RoleAccessController
- All Implemented Interfaces:
- AccessController
public class RoleAccessController
- extends Object
- implements AccessController
Provides a Role based access controller class. This access controller uses the
JEE servlet container to determine whether an authenticated user has access
to a specified role.
This class is used as the default AccessController by the Menu class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RoleAccessController
public RoleAccessController()
hasAccess
public boolean hasAccess(HttpServletRequest request,
String role)
- Return true if the user is in the specified security access role.
Please note: if role is null this method returns true,
meaning user has access to resources without roles defined.
- Specified by:
hasAccess
in interface AccessController
- Parameters:
request
- the user requestrole
- the security access role to check
- Returns:
- true if the user is in the specified role
- See Also:
AccessController.hasAccess(HttpServletRequest, String)