mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Extend menu items and buttons to accept a list of required permissions
This commit is contained in:
@@ -305,17 +305,16 @@ A `PluginMenuItem` has the following attributes:
|
||||
|
||||
* `link` - The name of the URL path to which this menu item links
|
||||
* `link_text` - The text presented to the user
|
||||
* `permission` - The name of the permission required to display this link (optional)
|
||||
* `permissions` - A list of permissions required to display this link (optional)
|
||||
* `buttons` - An iterable of PluginMenuButton instances to display (optional)
|
||||
|
||||
|
||||
A `PluginMenuButton` has the following attributes:
|
||||
|
||||
* `link` - The name of the URL path to which this button links
|
||||
* `title` - The tooltip text (displayed when the mouse hovers over the button)
|
||||
* `icon_class` - Button icon CSS class
|
||||
* `color` - One of the choices provided by `ButtonColorChoices` (optional)
|
||||
* `permission` - The name of the permission required to display this button (optional)
|
||||
* `permissions` - A list of permissions required to display this button (optional)
|
||||
|
||||
## Extending Core Templates
|
||||
|
||||
|
Reference in New Issue
Block a user