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.

Eelco Hillenius, Jonathan Locke

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

Method Detail


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.

roles - the roles
true if a user or whatever subject this implementation wants to work with has at least on of the provided roles

Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.