| java.lang.Object org.ofbiz.security.Security
All known Subclasses: org.ofbiz.security.OFBizSecurity,
Security | abstract public class Security (Code) | | Security handler: This class is an abstract implementation for all commononly used security aspects.
author: David E. Jones author: Rainer Hermanns author: Andy Zeneski version: $Revision: 1.1 $ since: 2.0 |
Method Summary | |
abstract public Iterator | findUserLoginSecurityGroupByUserLoginId(String userLoginId) Uses userLoginSecurityGroupByUserLoginId cache to speed up the finding of the userLogin's security group list. | public GenericDelegator | getDelegator() | abstract public boolean | hasEntityPermission(String entity, String action, HttpSession session) Like hasPermission above, except it has functionality specific to Entity permissions. | abstract public boolean | hasEntityPermission(String entity, String action, GenericValue userLogin) Like hasPermission above, except it has functionality specific to Entity permissions. | abstract public boolean | hasPermission(String permission, HttpSession session) Checks to see if the currently logged in userLogin has the passed permission.
Parameters: permission - Name of the permission to check. Parameters: session - The current HTTP session, contains the logged in userLogin as an attribute. | abstract public boolean | hasPermission(String permission, GenericValue userLogin) Checks to see if the userLogin has the passed permission.
Parameters: permission - Name of the permission to check. Parameters: userLogin - The userLogin object for user to check against. | abstract public boolean | hasRolePermission(String application, String action, String primaryKey, String role, HttpSession session) Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: role - The roleTypeId which the user must validate with. | abstract public boolean | hasRolePermission(String application, String action, String primaryKey, String role, GenericValue userLogin) Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: role - The roleTypeId which the user must validate with. Parameters: userLogin - The userLogin object for user to check against. | abstract public boolean | hasRolePermission(String application, String action, String primaryKey, List roles, GenericValue userLogin) Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: roles - List of roleTypeId of which the user must validate with (ORed). Parameters: userLogin - The userLogin object for user to check against. | abstract public boolean | hasRolePermission(String application, String action, String primaryKey, List roles, HttpSession session) Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: roles - List of roleTypeId of which the user must validate with (ORed). | abstract public boolean | securityGroupPermissionExists(String groupId, String permission) Finds whether or not a SecurityGroupPermission row exists given a groupId and permission. | public void | setDelegator(GenericDelegator delegator) |
securityGroupPermissionCache | public static UtilCache securityGroupPermissionCache(Code) | | UtilCache to cache whether or not a certain SecurityGroupPermission row exists or not.
For each SecurityGroupPermissionPK there is a Boolean in the cache specifying whether or not it exists.
In this way the cache speeds things up whether or not the user has a permission.
|
userLoginSecurityGroupByUserLoginId | public static UtilCache userLoginSecurityGroupByUserLoginId(Code) | | UtilCache to cache a Collection of UserLoginSecurityGroup entities for each UserLogin, by userLoginId.
|
findUserLoginSecurityGroupByUserLoginId | abstract public Iterator findUserLoginSecurityGroupByUserLoginId(String userLoginId)(Code) | | Uses userLoginSecurityGroupByUserLoginId cache to speed up the finding of the userLogin's security group list.
Parameters: userLoginId - The userLoginId to find security groups by An iterator made from the Collection either cached or retrieved from the database through theUserLoginSecurityGroup Delegator. |
hasEntityPermission | abstract public boolean hasEntityPermission(String entity, String action, HttpSession session)(Code) | | Like hasPermission above, except it has functionality specific to Entity permissions. Checks the entity for the
specified action, as well as for "_ADMIN" to allow for simplified general administration permission.
Parameters: entity - The name of the Entity corresponding to the desired permission. Parameters: action - The action on the Entity corresponding to the desired permission. Parameters: session - The current HTTP session, contains the logged in userLogin as an attribute. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasEntityPermission | abstract public boolean hasEntityPermission(String entity, String action, GenericValue userLogin)(Code) | | Like hasPermission above, except it has functionality specific to Entity permissions. Checks the entity for the
specified action, as well as for "_ADMIN" to allow for simplified general administration permission.
Parameters: entity - The name of the Entity corresponding to the desired permission. Parameters: action - The action on the Entity corresponding to the desired permission. Parameters: userLogin - The userLogin object for user to check against. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasPermission | abstract public boolean hasPermission(String permission, HttpSession session)(Code) | | Checks to see if the currently logged in userLogin has the passed permission.
Parameters: permission - Name of the permission to check. Parameters: session - The current HTTP session, contains the logged in userLogin as an attribute. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasPermission | abstract public boolean hasPermission(String permission, GenericValue userLogin)(Code) | | Checks to see if the userLogin has the passed permission.
Parameters: permission - Name of the permission to check. Parameters: userLogin - The userLogin object for user to check against. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasRolePermission | abstract public boolean hasRolePermission(String application, String action, String primaryKey, String role, HttpSession session)(Code) | | Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: role - The roleTypeId which the user must validate with. Parameters: session - The current HTTP session, contains the logged in userLogin as an attribute. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasRolePermission | abstract public boolean hasRolePermission(String application, String action, String primaryKey, String role, GenericValue userLogin)(Code) | | Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: role - The roleTypeId which the user must validate with. Parameters: userLogin - The userLogin object for user to check against. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasRolePermission | abstract public boolean hasRolePermission(String application, String action, String primaryKey, List roles, GenericValue userLogin)(Code) | | Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: roles - List of roleTypeId of which the user must validate with (ORed). Parameters: userLogin - The userLogin object for user to check against. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
hasRolePermission | abstract public boolean hasRolePermission(String application, String action, String primaryKey, List roles, HttpSession session)(Code) | | Like hasEntityPermission above, this checks the specified action, as well as for "_ADMIN" to allow for simplified
general administration permission, but also checks action_ROLE and validates the user is a member for the
application.
Parameters: application - The name of the application corresponding to the desired permission. Parameters: action - The action on the application corresponding to the desired permission. Parameters: primaryKey - The primary key for the role check. Parameters: roles - List of roleTypeId of which the user must validate with (ORed). Parameters: session - The current HTTP session, contains the logged in userLogin as an attribute. Returns true if the currently logged in userLogin has the specified permission, otherwise returns false. |
securityGroupPermissionExists | abstract public boolean securityGroupPermissionExists(String groupId, String permission)(Code) | | Finds whether or not a SecurityGroupPermission row exists given a groupId and permission.
Uses the securityGroupPermissionCache to speed this up.
The groupId,permission pair is cached instead of the userLoginId,permission pair to keep the cache small and to
make it more changeable.
Parameters: groupId - The ID of the group Parameters: permission - The name of the permission boolean specifying whether or not a SecurityGroupPermission row exists |
|
|