Class UiComponentPolicyConstraint

java.lang.Object
io.jmix.uiconstraints.security.constraint.UiComponentPolicyConstraint
All Implemented Interfaces:
AccessConstraint<UiComponentPolicyContext>

@NullMarked @Component("uicns_UiComponentPolicyConstraint") public class UiComponentPolicyConstraint extends Object implements AccessConstraint<UiComponentPolicyContext>
Answers a UiComponentPolicyContext from the UI component policies assigned to the current user: a policy with the DENY effect denies the corresponding permission, and a component that no policy mentions is left permitted, since policies only restrict.

The constraint is registered by UiComponentPolicyConstraintsRegistration, so it takes part in AccessManager.applyRegisteredConstraints(T) along with the constraints of other policy types. An application may register a constraint of its own for the same context to restrict a component further; note that the applier only asks about components some policy of the current user mentions.

See Also: