Skip to content

Commit

Permalink
Merge pull request #72 from DanSheps/develop
Browse files Browse the repository at this point in the history
Fixes #70 - Add menu permissions
  • Loading branch information
DanSheps authored Jun 21, 2023
2 parents 537e648 + 8345aa9 commit c1379ba
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions netbox_config_backup/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
from utilities.choices import ButtonColorChoices

item = PluginMenuItem(
link='plugins:netbox_config_backup:backup_list',
link_text='Devices',
buttons=[
PluginMenuButton(
link="plugins:netbox_config_backup:backup_add",
title="Add",
icon_class="mdi mdi-plus",
color=ButtonColorChoices.GREEN,
),
]
)
link='plugins:netbox_config_backup:backup_list',
link_text='Devices',
permissions=['netbox_config_backup.view_backups'],
buttons=[
PluginMenuButton(
link="plugins:netbox_config_backup:backup_add",
title="Add",
icon_class="mdi mdi-plus",
color=ButtonColorChoices.GREEN,
),
]
)

menu = PluginMenu(
label="Configuration Backup",
groups=(
('Backup Jobs', (item,)),
)
label="Configuration Backup",
groups=(
('Backup Jobs', (item,)),
)
)

0 comments on commit c1379ba

Please sign in to comment.