Package io.jmix.flowui.accesscontext
Class UiShowViewContext
java.lang.Object
io.jmix.flowui.accesscontext.UiShowViewContext
- All Implemented Interfaces:
AccessContext
Defines an authorization point for showing
View.
Determines whether a specific UI view can be displayed based on access permissions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions.Retrieves the identifier of theViewassociated with this context.booleanChecks whether access is permitted within the current context.voidDenies access for the associatedViewby setting the permission state to false.
-
Field Details
-
viewId
-
permitted
protected boolean permitted
-
-
Constructor Details
-
UiShowViewContext
-
-
Method Details
-
getViewId
Retrieves the identifier of theViewassociated with this context.- Returns:
- the view identifier
-
setDenied
public void setDenied()Denies access for the associatedViewby setting the permission state to false. This method is used to explicitly restrict access within the current context. -
isPermitted
public boolean isPermitted()Checks whether access is permitted within the current context.- Returns:
trueif access is permitted,falseotherwise
-
explainConstraints
Description copied from interface:AccessContextReturns a human-readable explanation of constraints applied to the current context instance for logging of authorization decisions. Null if the current context does not impose any constraints.- Specified by:
explainConstraintsin interfaceAccessContext
-