mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Add name, enabled fields to ObjectPermission
This commit is contained in:
@ -36,7 +36,7 @@ class NestedObjectPermissionSerializer(WritableNestedSerializer):
|
||||
|
||||
class Meta:
|
||||
model = ObjectPermission
|
||||
fields = ['id', 'object_types', 'groups', 'users', 'actions']
|
||||
fields = ['id', 'name', 'enabled', 'object_types', 'groups', 'users', 'actions']
|
||||
|
||||
def get_groups(self, obj):
|
||||
return [g.name for g in obj.groups.all()]
|
||||
|
Reference in New Issue
Block a user