mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
12589 move user and group admin from admin (#12877)
Move admin views for users, groups, and object permissions from the admin site to the NetBox frontend --------- Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
@ -18,11 +18,10 @@ def get_permission_for_model(model, action):
|
||||
:param model: A model or instance
|
||||
:param action: View, add, change, or delete (string)
|
||||
"""
|
||||
return '{}.{}_{}'.format(
|
||||
model._meta.app_label,
|
||||
action,
|
||||
model._meta.model_name
|
||||
)
|
||||
# Resolve to the "concrete" model (for proxy models)
|
||||
model = model._meta.concrete_model
|
||||
|
||||
return f'{model._meta.app_label}.{action}_{model._meta.model_name}'
|
||||
|
||||
|
||||
def resolve_permission(name):
|
||||
|
Reference in New Issue
Block a user