Added detail to set permission response.

This commit is contained in:
Norman Jäckel 2019-06-05 11:57:29 +02:00
parent 32af73cfb7
commit b17a0f154f

View File

@ -386,7 +386,7 @@ class GroupViewSet(ModelViewSet):
@transaction.atomic
def set_permission(self, request, *args, **kwargs):
"""
Send {perm: <permissionstring> set: <True/False>} to set or
Send {perm: <permissionstring>, set: <True/False>} to set or
remove the permission from a group
"""
perm = request.data.get("perm")
@ -417,7 +417,9 @@ class GroupViewSet(ModelViewSet):
self.inform_permission_change(group, permission)
inform_changed_data(group)
return Response()
return Response(
{"detail": f"Permissions of group {group.pk} successfully changed."}
)
def inform_permission_change(
self,