com.pow2.acl.struts.action
Class ACLRoleAction

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.pow2.struts.action.BaseAction
          extended bycom.pow2.struts.action.DispatcherAction
              extended bycom.pow2.acl.struts.action.ACLDispatcherAction
                  extended bycom.pow2.acl.struts.action.ACLRoleAction

public class ACLRoleAction
extends ACLDispatcherAction

Abstract class that extends the ACLAction class.
Provides a validatePermissions method implementation that checks if the current user owns the acl role (and belongs to the acl group, if specified) retrieved from the ACLActionMapping object of the current action.

Author:
Luca Fossato

Field Summary
 
Fields inherited from class com.pow2.struts.action.BaseAction
cat, FWD_CANCEL, FWD_FAILURE, FWD_INVALID_SESSION, FWD_LOGIN
 
Fields inherited from class org.apache.struts.action.Action
DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGES_KEY, MULTIPART_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
ACLRoleAction()
           
 
Method Summary
 boolean validatePermissions(com.pow2.user.User user, ACLDAO acl, org.apache.struts.action.ActionMapping mapping, HttpServletRequest request, org.apache.struts.action.ActionErrors errors)
          Validate user permissions.
 
Methods inherited from class com.pow2.acl.struts.action.ACLDispatcherAction
failureForward, invalidSessionForward, noPermissionsForward, validateSession
 
Methods inherited from class com.pow2.struts.action.DispatcherAction
perform
 
Methods inherited from class com.pow2.struts.action.BaseAction
getForward, isFailureForward, loginForward, loginForward
 
Methods inherited from class org.apache.struts.action.Action
generateToken, getLocale, getResources, getServlet, isCancelled, isTokenValid, perform, perform, perform, resetToken, saveErrors, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ACLRoleAction

public ACLRoleAction()
Method Detail

validatePermissions

public boolean validatePermissions(com.pow2.user.User user,
                                   ACLDAO acl,
                                   org.apache.struts.action.ActionMapping mapping,
                                   HttpServletRequest request,
                                   org.apache.struts.action.ActionErrors errors)
Validate user permissions.
This method checks if the current user owns the acl role and belongs to the acl group retrieved from the ACLActionMapping object of the current action.

Overrides:
validatePermissions in class ACLDispatcherAction
Parameters:
user - the current User object
acl - the data access object for ACL validation
mapping - the ActionMapping object of the current action
errors - the ActionError list to fill with possible errors
request - Description of the Parameter
Returns:
true if user has permissions for execute this action, false otherwise


Copyright © 2002-2003 Power Of Two S.R.L. All Rights Reserved.