Package io.jmix.securityflowui.access
Class UiViewAccessChecker
java.lang.Object
io.jmix.securityflowui.access.UiViewAccessChecker
- All Implemented Interfaces:
com.vaadin.flow.router.BeforeEnterListener
,com.vaadin.flow.router.internal.BeforeEnterHandler
,Serializable
public class UiViewAccessChecker
extends Object
implements com.vaadin.flow.router.BeforeEnterListener
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected Class<? extends com.vaadin.flow.component.Component>
protected final UiAccessChecker
-
Constructor Summary
ConstructorDescriptionUiViewAccessChecker
(boolean enabled, UiAccessChecker uiAccessChecker) UiViewAccessChecker
(UiAccessChecker uiAccessChecker) -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeEnter
(com.vaadin.flow.router.BeforeEnterEvent beforeEnterEvent) void
enable()
Enables the access checker.protected boolean
protected boolean
isHasAccess
(Class<?> targetView) protected boolean
isProductionMode
(com.vaadin.flow.router.BeforeEnterEvent beforeEnterEvent) void
setLoginView
(Class<? extends com.vaadin.flow.component.Component> loginView) protected void
-
Field Details
-
uiAccessChecker
-
enabled
protected boolean enabled -
loginView
-
-
Constructor Details
-
UiViewAccessChecker
-
UiViewAccessChecker
-
-
Method Details
-
enable
public void enable()Enables the access checker.This must be called for the access checker to perform any checks. By default, the access checker is disabled.
-
setLoginView
-
throwIfLoginViewSet
protected void throwIfLoginViewSet() -
beforeEnter
public void beforeEnter(com.vaadin.flow.router.BeforeEnterEvent beforeEnterEvent) - Specified by:
beforeEnter
in interfacecom.vaadin.flow.router.internal.BeforeEnterHandler
-
isHasAccess
-
isProductionMode
protected boolean isProductionMode(com.vaadin.flow.router.BeforeEnterEvent beforeEnterEvent) -
isAnonymousAuthentication
protected boolean isAnonymousAuthentication()
-