mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-06-27 07:17:10 +00:00
fix: 更新用户组权限问题
This commit is contained in:
parent
7a708156ee
commit
32255c6077
@ -16,6 +16,10 @@ class UserUserGroupRelationViewSet(JMSBulkRelationModelViewSet):
|
|||||||
search_fields = filterset_fields
|
search_fields = filterset_fields
|
||||||
serializer_class = serializers.User2GroupRelationSerializer
|
serializer_class = serializers.User2GroupRelationSerializer
|
||||||
m2m_field = User.groups.field
|
m2m_field = User.groups.field
|
||||||
|
rbac_perms = {
|
||||||
|
'create': 'users.change_usergroup',
|
||||||
|
'destroy': 'users.change_usergroup'
|
||||||
|
}
|
||||||
|
|
||||||
def get_queryset(self):
|
def get_queryset(self):
|
||||||
return super().get_queryset().annotate(
|
return super().get_queryset().annotate(
|
||||||
|
Loading…
Reference in New Issue
Block a user