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, isAuthorizationRequired
execute
protected boolean isAuthorized(ActionContext context, String[] roles, ActionConfig mapping) throws Exception
AbstractAuthorizeAction
Determine if the action is authorized for the given roles.
isAuthorized
in class AbstractAuthorizeAction
context
- The Context
for the current requestroles
- An array of valid roles for this requestmapping
- The current action mappingtrue
if the request is authorized, else
false
UnauthorizedActionException
- 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)
AbstractAuthorizeAction
Retrieve error message from context.
getErrorMessage
in class AbstractAuthorizeAction
context
- The Context
for the current requestactionConfig
- The current action mappingCopyright © 2000–2016 Apache Software Foundation. All rights reserved.