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 theView
associated with this context.boolean
Checks whether access is permitted within the current context.void
Denies access for the associatedView
by setting the permission state to false.
-
Field Details
-
viewId
-
permitted
protected boolean permitted
-
-
Constructor Details
-
UiShowViewContext
-
-
Method Details
-
getViewId
Retrieves the identifier of theView
associated with this context.- Returns:
- the view identifier
-
setDenied
public void setDenied()Denies access for the associatedView
by 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:
true
if access is permitted,false
otherwise
-
explainConstraints
Description copied from interface:AccessContext
Returns 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:
explainConstraints
in interfaceAccessContext
-