mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #14438: Database representation of scripts
- Introduces the Script model to represent individual Python classes within a ScriptModule file - Automatically migrates jobs & event rules --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@@ -6,6 +6,7 @@ __all__ = (
|
||||
'can_add',
|
||||
'can_change',
|
||||
'can_delete',
|
||||
'can_run',
|
||||
'can_sync',
|
||||
'can_view',
|
||||
)
|
||||
@@ -42,3 +43,8 @@ def can_delete(user, instance):
|
||||
@register.filter()
|
||||
def can_sync(user, instance):
|
||||
return _check_permission(user, instance, 'sync')
|
||||
|
||||
|
||||
@register.filter()
|
||||
def can_run(user, instance):
|
||||
return _check_permission(user, instance, 'run')
|
||||
|
Reference in New Issue
Block a user