com.vaadin.flow.server.auth.
Interface MenuAccessControl
All Superinterfaces:
All Known Implementing Classes:
Interface for controlling access to routes in the application's menu component.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enum for controlling how the client-side menu should be populated.
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
canAccessView
(AvailableViewInfo viewInfo) Determines if current user has permissions to access the given view.
static boolean
canAccessView
(AvailableViewInfo viewInfo, Principal principal, Predicate<String> roleChecker) Check view against authentication state.
Gets whether the Hilla application's main menu should be populated automatically with server side routes and therefore routes information sent to the browser.
void
setPopulateClientSideMenu
(MenuAccessControl.PopulateClientMenu populateClientSideMenu) Sets whether the Hilla application's main menu should be populated automatically with server side routes and therefore routes information sent to the browser.
-
Method Details
-
setPopulateClientSideMenu
Sets whether the Hilla application's main menu should be populated automatically with server side routes and therefore routes information sent to the browser. Three possible values:
MenuAccessControl.PopulateClientMenu.ALWAYS
,MenuAccessControl.PopulateClientMenu.NEVER
,MenuAccessControl.PopulateClientMenu.AUTOMATIC
.Parameters:
populateClientSideMenu
- whether the client-side menu should be populated with server side routes -
getPopulateClientSideMenu
MenuAccessControl.PopulateClientMenu getPopulateClientSideMenu()Gets whether the Hilla application's main menu should be populated automatically with server side routes and therefore routes information sent to the browser.
Returns:
enum of type
MenuAccessControl.PopulateClientMenu
-