1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Add REST API endpoint for ObjectPermissions

This commit is contained in:
Jeremy Stretch
2020-06-03 13:08:04 -04:00
parent 19b57aa1ea
commit 3084d58da1
8 changed files with 228 additions and 16 deletions

View File

@ -1,4 +1,4 @@
from django.contrib.auth.models import User
from django.contrib.auth.models import Group, User
from utilities.api import WritableNestedSerializer
@ -8,9 +8,16 @@ _all_ = [
#
# Users
# Groups and users
#
class NestedGroupSerializer(WritableNestedSerializer):
class Meta:
model = Group
fields = ['id', 'name']
class NestedUserSerializer(WritableNestedSerializer):
class Meta: