public class AuthorizeAction extends AbstractAuthorizeAction
Determine if the action is authorized for the given roles.
| Constructor and Description |
|---|
AuthorizeAction() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getErrorMessage(ActionContext context,
ActionConfig actionConfig)
Retrieve error message from context.
|
protected boolean |
isAuthorized(ActionContext context,
String[] roles,
ActionConfig mapping)
Determine if the action is authorized for the given roles.
|
execute, isAuthorizationRequiredexecuteprotected boolean isAuthorized(ActionContext context, String[] roles, ActionConfig mapping) throws Exception
AbstractAuthorizeActionDetermine if the action is authorized for the given roles.
isAuthorized in class AbstractAuthorizeActioncontext - The Context for the current requestroles - An array of valid roles for this requestmapping - The current action mappingtrue if the request is authorized, else
falseUnauthorizedActionException - If the logic determines that the request is not authorized
but does not wish to rely upon the default mechanism reporting the error.Exception - If the action cannot be tested for authorizationprotected String getErrorMessage(ActionContext context, ActionConfig actionConfig)
AbstractAuthorizeActionRetrieve error message from context.
getErrorMessage in class AbstractAuthorizeActioncontext - The Context for the current requestactionConfig - The current action mappingCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.