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 Details

    • DefaultResourcePolicyGroupResolver

      public DefaultResourcePolicyGroupResolver()
  • Method Details

    • resolvePolicyGroup

      @Nullable public String resolvePolicyGroup(ResourcePolicy resourcePolicy)
      Methods evaluates default policy group for a given ResourcePolicy.
      Parameters:
      resourcePolicy - a ResourcePolicy
      Returns:
      a group policy or null if the group cannot be resolved
      See Also:
    • resolvePolicyGroup

      @Nullable public String resolvePolicyGroup(String resourcePolicyType, String resource)
      Methods evaluates security policy group for a given resource of the ResourcePolicy.

      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 or EditorScreen 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 - a ResourcePolicyType, 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: