Class RoleAccessController

  extended by
All Implemented Interfaces:

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.

Constructor Summary
Method Summary
 boolean hasAccess(HttpServletRequest request, String role)
          Return true if the user is in the specified security access role.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public RoleAccessController()
Method Detail


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
request - the user request
role - the security access role to check
true if the user is in the specified role
See Also:
AccessController.hasAccess(HttpServletRequest, String)