Class ActionAuthorizationStrategy
java.lang.Object
org.apache.wicket.authorization.IAuthorizationStrategy.AllowAllAuthorizationStrategy
org.apache.wicket.authorization.strategies.action.ActionAuthorizationStrategy
- All Implemented Interfaces:
IAuthorizationStrategy
public class ActionAuthorizationStrategy
extends IAuthorizationStrategy.AllowAllAuthorizationStrategy
An authorization strategy which allows the use of a command pattern for users that want to
authorize a variety of different types of actions throughout an application.
- Since:
- Wicket 1.2
- Author:
- Jonathan Locke
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
IAuthorizationStrategy.AllowAllAuthorizationStrategy
-
Field Summary
Fields inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
ALLOW_ALL
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionAuthorizer
(IActionAuthorizer authorizer) Adds an action authorizer.boolean
isActionAuthorized
(Component component, Action action) Gets whether the given action is permitted.Methods inherited from class org.apache.wicket.authorization.IAuthorizationStrategy.AllowAllAuthorizationStrategy
isInstantiationAuthorized, isResourceAuthorized
-
Constructor Details
-
ActionAuthorizationStrategy
public ActionAuthorizationStrategy()
-
-
Method Details
-
addActionAuthorizer
Adds an action authorizer.- Parameters:
authorizer
- The action authorizer to add
-
isActionAuthorized
Description copied from interface:IAuthorizationStrategy
Gets whether the given action is permitted. If it is, this method should return true. If it isn't, this method should either return false or - in case of a serious breach - throw a security exception. Returning is generally preferable over throwing an exception as that doesn't break the normal flow.- Specified by:
isActionAuthorized
in interfaceIAuthorizationStrategy
- Overrides:
isActionAuthorized
in classIAuthorizationStrategy.AllowAllAuthorizationStrategy
- Parameters:
component
- The component to be acted uponaction
- The action to authorize on the component- Returns:
- Whether the given action may be taken on the given component
- See Also:
-