You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/test_doc_main_menu.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
fromiommi.experimental.main_menuimport (
4
4
M,
5
5
MainMenu,
6
-
menu_access_control_middleware,
6
+
main_menu_middleware,
7
7
)
8
8
fromtests.helpersimport (
9
9
req,
@@ -21,7 +21,7 @@
21
21
22
22
The main menu component in iommi is used to create the main navigation for your app. This is primarily useful for SaaS or internal apps. It creates a sidebar menu with support for nested menu items, and centralized access control that automatically shows only menu items the user has access to.
23
23
24
-
To set up your main menu you declare it, register the `iommi.experimental.main_menu.menu_access_control_middleware` middleware, and define the `IOMMI_MAIN_MENU` setting to point to where you have defined it (like `IOMMI_MAIN_MENU = 'your_app.main_menu.main_menu'`).
24
+
To set up your main menu you declare it, register the `iommi.experimental.main_menu.main_menu_middleware` middleware, and define the `IOMMI_MAIN_MENU` setting to point to where you have defined it (like `IOMMI_MAIN_MENU = 'your_app.main_menu.main_menu'`).
25
25
26
26
Access control is recursive, meaning that if a user does not have access to a menu item, it is automatically denied access to all subitems.
assertmenu_fully_qualified_nameisnotNone, "To use the menu_access_control_middleware, you must define settings.IOMMI_MAIN_MENU as a string to the full path to the main menu declaration"
402
+
assertmenu_fully_qualified_nameisnotNone, "To use the main_menu_middleware, you must define settings.IOMMI_MAIN_MENU as a string to the full path to the main menu declaration"
399
403
assert'.'inmenu_fully_qualified_name, "IOMMI_MAIN_MENU must be in `your_module.symbol` format"
0 commit comments