|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ofbiz.security.Security
public abstract class Security
Security handler: This class is an abstract implementation for all commononly used security aspects.
Field Summary | |
---|---|
static UtilCache<GenericValue,java.lang.Boolean> |
securityGroupPermissionCache
UtilCache to cache whether or not a certain SecurityGroupPermission row exists or not. |
static UtilCache<java.lang.String,java.util.List<GenericValue>> |
userLoginSecurityGroupByUserLoginId
UtilCache to cache a Collection of UserLoginSecurityGroup entities for each UserLogin, by userLoginId. |
Constructor Summary | |
---|---|
Security()
|
Method Summary | |
---|---|
abstract java.util.Iterator<GenericValue> |
findUserLoginSecurityGroupByUserLoginId(java.lang.String userLoginId)
Uses userLoginSecurityGroupByUserLoginId cache to speed up the finding of the userLogin's security group list. |
GenericDelegator |
getDelegator()
|
abstract boolean |
hasEntityPermission(java.lang.String entity,
java.lang.String action,
HttpSession session)
Like hasPermission above, except it has functionality specific to Entity permissions. |
abstract boolean |
hasPermission(java.lang.String permission,
HttpSession session)
Checks to see if the currently logged in userLogin has the passed permission. |
abstract boolean |
hasRolePermission(java.lang.String application,
java.lang.String action,
java.lang.String primaryKey,
java.util.List<java.lang.String> 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. |
abstract boolean |
hasRolePermission(java.lang.String application,
java.lang.String action,
java.lang.String primaryKey,
java.util.List<java.lang.String> 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. |
abstract boolean |
hasRolePermission(java.lang.String application,
java.lang.String action,
java.lang.String primaryKey,
java.lang.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. |
abstract boolean |
securityGroupPermissionExists(java.lang.String groupId,
java.lang.String permission)
Finds whether or not a SecurityGroupPermission row exists given a groupId and permission. |
void |
setDelegator(GenericDelegator delegator)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static UtilCache<java.lang.String,java.util.List<GenericValue>> userLoginSecurityGroupByUserLoginId
public static UtilCache<GenericValue,java.lang.Boolean> securityGroupPermissionCache
Constructor Detail |
---|
public Security()
Method Detail |
---|
public GenericDelegator getDelegator()
public void setDelegator(GenericDelegator delegator)
public abstract java.util.Iterator<GenericValue> findUserLoginSecurityGroupByUserLoginId(java.lang.String userLoginId)
userLoginId
- The userLoginId to find security groups by
public abstract boolean securityGroupPermissionExists(java.lang.String groupId, java.lang.String permission)
groupId
- The ID of the grouppermission
- The name of the permission
public abstract boolean hasPermission(java.lang.String permission, HttpSession session)
permission
- Name of the permission to check.session
- The current HTTP session, contains the logged in userLogin as an attribute.
public abstract boolean hasEntityPermission(java.lang.String entity, java.lang.String action, HttpSession session)
entity
- The name of the Entity corresponding to the desired permission.action
- The action on the Entity corresponding to the desired permission.session
- The current HTTP session, contains the logged in userLogin as an attribute.
public abstract boolean hasRolePermission(java.lang.String application, java.lang.String action, java.lang.String primaryKey, java.lang.String role, HttpSession session)
application
- The name of the application corresponding to the desired permission.action
- The action on the application corresponding to the desired permission.primaryKey
- The primary key for the role check.role
- The roleTypeId which the user must validate with.session
- The current HTTP session, contains the logged in userLogin as an attribute.
public abstract boolean hasRolePermission(java.lang.String application, java.lang.String action, java.lang.String primaryKey, java.util.List<java.lang.String> roles, GenericValue userLogin)
application
- The name of the application corresponding to the desired permission.action
- The action on the application corresponding to the desired permission.primaryKey
- The primary key for the role check.roles
- List of roleTypeId of which the user must validate with (ORed).userLogin
- The userLogin object for user to check against.
public abstract boolean hasRolePermission(java.lang.String application, java.lang.String action, java.lang.String primaryKey, java.util.List<java.lang.String> roles, HttpSession session)
application
- The name of the application corresponding to the desired permission.action
- The action on the application corresponding to the desired permission.primaryKey
- The primary key for the role check.roles
- List of roleTypeId of which the user must validate with (ORed).session
- The current HTTP session, contains the logged in userLogin as an attribute.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |