Package io.jmix.security.model
Class ResourceRole
java.lang.Object
io.jmix.security.model.BaseRole
io.jmix.security.model.ResourceRole
- All Implemented Interfaces:
Serializable
Class is a container for security resource policies.
Resource policies define permissions for resources. A resource may be a screen, entity CRUD operation, entity attribute, etc.
Role objects may be created from different sources:
- from interfaces annotated with
ResourceRole
- from database Role entities
- created explicitly by the application
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A data structure that stores role policies grouped by policy type and resource. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns policies defined in the current role and in all its child roles.Returns an index structure that stores policies of the current role and all child roles.Returns a list of policies defined directly in the current role, excluding policies from child roles.Returns an index structure that stores policies of the current role only.void
setAllResourcePolicies
(Collection<ResourcePolicy> allResourcePolicies) void
setResourcePolicies
(Collection<ResourcePolicy> resourcePolicies) void
Methods inherited from class io.jmix.security.model.BaseRole
getChildRoles, getCode, getCustomProperties, getDescription, getName, getSource, getTenantId, setChildRoles, setCode, setCustomProperties, setDescription, setName, setSource, setTenantId
-
Constructor Details
-
ResourceRole
public ResourceRole()
-
-
Method Details
-
getScopes
-
setScopes
-
getResourcePolicies
Returns a list of policies defined directly in the current role, excluding policies from child roles. -
setResourcePolicies
-
getAllResourcePolicies
Returns policies defined in the current role and in all its child roles. -
setAllResourcePolicies
-
getResourcePoliciesIndex
Returns an index structure that stores policies of the current role only. -
getAllResourcePoliciesIndex
Returns an index structure that stores policies of the current role and all child roles.
-