java.lang.Object
org.apache.struts.action.Action
com.aoindustries.web.struts.PageAction
com.aoindustries.web.struts.AuthenticatedAction
com.aoindustries.web.struts.PermissionAction
- Direct Known Subclasses:
AddCreditCardAction
,CancelAction
,CancelFeedbackAction
,CancelFeedbackCompletedAction
,ConfigureAutomaticBillingAction
,ConfigureAutomaticBillingCompletedAction
,CreateAction
,CreateCompletedAction
,CreditCardManagerAction
,DeleteCreditCardAction
,DeleteCreditCardCompletedAction
,EditAction
,EditCompletedAction
,EditCreditCardAction
,GlobalPasswordSetterAction
,GlobalPasswordSetterCompletedAction
,LinuxAccountPasswordSetterAction
,LinuxAccountPasswordSetterCompletedAction
,MakePaymentSelectCardAction
,MakePaymentStoredCardAction
,MysqlPasswordSetterAction
,MysqlPasswordSetterCompletedAction
,MysqlReplicationMonitorAction
,PostgresqlPasswordSetterAction
,PostgresqlPasswordSetterCompletedAction
,VncConsoleAction
Makes sure the authenticated user has the necessary permissions to perform the requested task.
If they do not, sets the request attribute "permissionDenied" with the
List<AoservConnector>
and returns mapping for "permissionDenied".
Otherwise, if all the permissions have been granted, calls executePermissionGranted
.
The default implementation of this new executePermissionGranted
method simply returns the mapping
of "success".
- Author:
- AO Industries, Inc.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal ActionForward
execute
(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) Once authentication has been handled, this version of the execute method is invoked.executePermissionDenied
(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn, List<Permission> permissions) Called when the permissions has been denied.executePermissionGranted
(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) Called when permission has been granted.abstract Set
<Permission.Name> Gets the set of permissions that are required for this action.Methods inherited from class com.aoindustries.web.struts.AuthenticatedAction
execute, getAoConn, getAuthenticatedAoConn
Methods inherited from class com.aoindustries.web.struts.PageAction
execute
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Constructor Details
-
PermissionAction
public PermissionAction()
-
-
Method Details
-
execute
public final ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) throws Exception Description copied from class:AuthenticatedAction
Once authentication has been handled, this version of the execute method is invoked. The default implementation of this method simply returns the mapping of "success".- Overrides:
execute
in classAuthenticatedAction
- Throws:
Exception
-
executePermissionGranted
public ActionForward executePermissionGranted(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn) throws Exception Called when permission has been granted. By default, returns mapping for "success".- Throws:
Exception
-
executePermissionDenied
public ActionForward executePermissionDenied(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, AoservConnector aoConn, List<Permission> permissions) throws Exception Called when the permissions has been denied. By default, sets request attributeConstants.PERMISSION_DENIED
and returns mapping for "permission-denied".- Throws:
Exception
-
getPermissions
Gets the set of permissions that are required for this action. Returning a null or empty set will result in nothing being allowed.- See Also:
-