public interface Security
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Modifier and Type | Method and Description |
---|---|
void |
checkSpecificPermission(java.lang.String name)
Check if current user has a specific permission.
|
java.lang.Object |
evaluateConstraintScript(Entity entity,
java.lang.String groovyScript) |
boolean |
hasConstraints(MetaClass metaClass)
Check if there are registered constraints for the metaClass or it's original metaClass
|
boolean |
hasInMemoryConstraints(MetaClass metaClass,
ConstraintOperationType... operationTypes)
Deprecated.
unused method
|
boolean |
isEntityAttrPermitted(java.lang.Class<?> entityClass,
java.lang.String property,
EntityAttrAccess access)
Check if current user has permission to an entity attribute.
|
boolean |
isEntityAttrPermitted(MetaClass metaClass,
java.lang.String property,
EntityAttrAccess access)
Check if current user has permission to an entity attribute.
|
boolean |
isEntityAttrReadPermitted(MetaClass metaClass,
java.lang.String propertyPath)
Check if current user can read an entity attribute which is the last part of the path given.
|
boolean |
isEntityAttrReadPermitted(MetaPropertyPath propertyPath)
Check if current user can read an entity attribute which is the last part of the path given.
|
boolean |
isEntityAttrUpdatePermitted(MetaClass metaClass,
java.lang.String propertyPath)
Check if current user can modify an entity attribute which is the last part of the path given.
|
boolean |
isEntityAttrUpdatePermitted(MetaPropertyPath propertyPath)
Check if current user can modify an entity attribute which is the last part of the path given.
|
boolean |
isEntityOpPermitted(java.lang.Class<?> entityClass,
EntityOp entityOp)
Check if current user has permission to execute an entity operation.
|
boolean |
isEntityOpPermitted(MetaClass metaClass,
EntityOp entityOp)
Check if current user has permission to execute an entity operation.
|
boolean |
isPermitted(Entity entity,
ConstraintOperationType operationType)
Deprecated.
Use
isPermitted(Entity, EntityOp) instead |
boolean |
isPermitted(Entity entity,
EntityOp operation)
Check if the operation type is permitted for the entity
|
boolean |
isPermitted(Entity entity,
java.lang.String customCode)
Check the special constraint permission for the entity
|
boolean |
isScreenPermitted(java.lang.String windowAlias)
Check if current user has permission to open a screen.
|
boolean |
isSpecificPermitted(java.lang.String name)
Check if current user has a specific permission.
|
static final java.lang.String NAME
boolean isScreenPermitted(java.lang.String windowAlias)
windowAlias
- screen id as registered in screens.xml
boolean isEntityOpPermitted(MetaClass metaClass, EntityOp entityOp)
metaClass
- entity meta-classentityOp
- operationboolean isEntityOpPermitted(java.lang.Class<?> entityClass, EntityOp entityOp)
entityClass
- entity classentityOp
- operationboolean isEntityAttrPermitted(MetaClass metaClass, java.lang.String property, EntityAttrAccess access)
metaClass
- entity meta-classproperty
- entity attribute nameaccess
- required accessboolean isEntityAttrPermitted(java.lang.Class<?> entityClass, java.lang.String property, EntityAttrAccess access)
entityClass
- entity classproperty
- entity attribute nameaccess
- required accessboolean isEntityAttrUpdatePermitted(MetaClass metaClass, java.lang.String propertyPath)
EntityOp.CREATE
or EntityOp.UPDATE
on the whole entity which the attribute belongs toEntityAttrAccess.MODIFY
on the attributemetaClass
- entity meta classpropertyPath
- entity attribute pathboolean isEntityAttrUpdatePermitted(MetaPropertyPath propertyPath)
EntityOp.CREATE
or EntityOp.UPDATE
on the whole entity which the attribute belongs toEntityAttrAccess.MODIFY
on the attributepropertyPath
- entity attribute pathboolean isEntityAttrReadPermitted(MetaPropertyPath propertyPath)
EntityOp.READ
on the whole entity which the attribute belongs toEntityAttrAccess.VIEW
on the attributepropertyPath
- entity attribute pathboolean isEntityAttrReadPermitted(MetaClass metaClass, java.lang.String propertyPath)
EntityOp.READ
on the whole entity which the attribute belongs toEntityAttrAccess.VIEW
on the attributemetaClass
- entity meta classpropertyPath
- entity attribute pathboolean isSpecificPermitted(java.lang.String name)
name
- specific permission idvoid checkSpecificPermission(java.lang.String name)
name
- specific permission idAccessDeniedException
- if the user has no specified permission@Deprecated boolean isPermitted(Entity entity, ConstraintOperationType operationType)
isPermitted(Entity, EntityOp)
insteadboolean isPermitted(Entity entity, EntityOp operation)
boolean isPermitted(Entity entity, java.lang.String customCode)
boolean hasConstraints(MetaClass metaClass)
@Deprecated boolean hasInMemoryConstraints(MetaClass metaClass, ConstraintOperationType... operationTypes)
operationTypes
for the metaClass or it's original metaClassjava.lang.Object evaluateConstraintScript(Entity entity, java.lang.String groovyScript)