org.apache.wicket.examples.authorization
Class UserRolesAuthorizer

java.lang.Object
  extended by org.apache.wicket.examples.authorization.UserRolesAuthorizer
All Implemented Interfaces:
IRoleCheckingStrategy

public class UserRolesAuthorizer
extends java.lang.Object
implements IRoleCheckingStrategy

The authorizer we need to provide to the authorization strategy implementation AnnotationsRoleAuthorizationStrategy.

Author:
Eelco Hillenius

Constructor Summary
UserRolesAuthorizer()
          Construct.
 
Method Summary
 boolean hasAnyRole(Roles roles)
          Whether any of the given roles matches.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserRolesAuthorizer

public UserRolesAuthorizer()
Construct.

Method Detail

hasAnyRole

public boolean hasAnyRole(Roles roles)
Description copied from interface: IRoleCheckingStrategy
Whether any of the given roles matches. For example, if a user has role USER and the provided roles are {USER, ADMIN} this method should return true as the user has at least one of the roles that were provided.

Specified by:
hasAnyRole in interface IRoleCheckingStrategy
Parameters:
roles - the roles
Returns:
true if a user or whatever subject this implementation wants to work with has at least on of the provided roles
See Also:
IRoleCheckingStrategy.hasAnyRole(Roles)


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.