Interface MenuItem
-
- All Known Implementing Classes:
ManageUsersPageMenuItem
public interface MenuItem
-
-
Method Summary
Modifier and Type Method Description boolean
applies()
java.lang.String
getIcon()
java.lang.String
getLabel()
java.lang.Class<? extends org.apache.wicket.Page>
getPageClass()
java.lang.String
getPath()
default boolean
isDirectAccessAllowed()
WicketApplicationBase
introduces a custom authorization service which prevents access to a page if the user is not able to see the corresponding menu item (cf.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
-
getIcon
java.lang.String getIcon()
-
getLabel
java.lang.String getLabel()
-
getPageClass
java.lang.Class<? extends org.apache.wicket.Page> getPageClass()
-
applies
boolean applies()
-
isDirectAccessAllowed
default boolean isDirectAccessAllowed()
WicketApplicationBase
introduces a custom authorization service which prevents access to a page if the user is not able to see the corresponding menu item (cf.applies()
). However, in some cases, it may be necessary to grant the user direct access to a page even if the user does not see the corresponding menu item. For example, users should not see the menu item for the user management page, but they may access this page directly in order to edit their own profile. In such cases, this method should returntrue
. Use this very carefully and ensure that the proper access checks are performed on the target page.
-
-