Package io.jmix.securityui.model
Class DefaultResourcePolicyGroupResolver
java.lang.Object
io.jmix.securityui.model.DefaultResourcePolicyGroupResolver
@Component("sec_DefaultResourcePolicyGroupResolver")
public class DefaultResourcePolicyGroupResolver
extends Object
Class is used for getting default policy group for the
ResourcePolicy
instance.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionresolvePolicyGroup
(ResourcePolicy resourcePolicy) Methods evaluates default policy group for a givenResourcePolicy
.resolvePolicyGroup
(String resourcePolicyType, String resource) Methods evaluates security policy group for a given resource of theResourcePolicy
.
-
Constructor Details
-
DefaultResourcePolicyGroupResolver
public DefaultResourcePolicyGroupResolver()
-
-
Method Details
-
resolvePolicyGroup
Methods evaluates default policy group for a givenResourcePolicy
.- Parameters:
resourcePolicy
- aResourcePolicy
- Returns:
- a group policy or null if the group cannot be resolved
- See Also:
-
resolvePolicyGroup
Methods evaluates security policy group for a given resource of theResourcePolicy
.For entity:
- the entity name is returned
For entity attributes:
- a policy group for the attribute's entity is returned
For screen:
-
returns a policy group of the related entity (for standard editor and browser). If the screen implements
the
LookupScreen
orEditorScreen
interfaces then a generic type is taken and assuming that a generic type points to the entity class the policy group of the entity is returned
For menu:
- policy group for the related screen is returned
- Parameters:
resourcePolicyType
- aResourcePolicyType
, i.e. screen, entity, menu, etc.resource
- a resource (screenId, entity name, etc.)- Returns:
- a policy group or null if policy group cannot be resolved
- See Also:
-