fix: 更新用户组权限问题

pull/12454/head
wangruidong 2023-12-29 10:19:41 +08:00 committed by Bryan
parent 7a708156ee
commit 32255c6077
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ class UserUserGroupRelationViewSet(JMSBulkRelationModelViewSet):
search_fields = filterset_fields
serializer_class = serializers.User2GroupRelationSerializer
m2m_field = User.groups.field
rbac_perms = {
'create': 'users.change_usergroup',
'destroy': 'users.change_usergroup'
}
def get_queryset(self):
return super().get_queryset().annotate(