1
0
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:
Arthur Hanson
2023-07-21 03:22:08 +07:00
committed by GitHub
parent 96ea0ac9c7
commit a4acb50edd
32 changed files with 1545 additions and 421 deletions

View File

@ -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):