Package com.vaadin.flow.server.auth
Interface MenuAccessControl
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
DefaultMenuAccessControl,SpringMenuAccessControl
Interface for controlling access to routes in the application's menu
component.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnum for controlling how the client-side menu should be populated. -
Method Summary
Modifier and TypeMethodDescriptiondefault booleancanAccessView(AvailableViewInfo viewInfo) Determines if current user has permissions to access the given view.static booleancanAccessView(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.voidsetPopulateClientSideMenu(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
-