org.apache.wicket.authorization.strategies.role
Interface IRoleCheckingStrategy

All Known Implementing Classes:
AuthenticatedWebApplication, MyAuthenticatedWebApplication, UserRolesAuthorizer

public interface IRoleCheckingStrategy

Strategy for doing role checking. Normally, an implementation of this strategy interface would look in the current session for credentials that indicate what roles the current user can take on, but any kind of strategy is possible. For example, you could have a role checking strategy that allowed gave users the ADMIN role between 9AM and 5PM.

Author:
Eelco Hillenius, Jonathan Locke

Method Summary
 boolean hasAnyRole(Roles roles)
          Whether any of the given roles matches.
 

Method Detail

hasAnyRole

boolean hasAnyRole(Roles roles)
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.

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


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