mirror of https://github.com/jumpserver/jumpserver
parent
f0325c48df
commit
e3bc54e764
|
@ -5,12 +5,13 @@ from django.db.models import F
|
||||||
|
|
||||||
from common.drf.api import JMSBulkRelationModelViewSet
|
from common.drf.api import JMSBulkRelationModelViewSet
|
||||||
from .. import serializers
|
from .. import serializers
|
||||||
from ..models import User
|
from ..models import User, UserGroup
|
||||||
|
|
||||||
__all__ = ['UserUserGroupRelationViewSet']
|
__all__ = ['UserUserGroupRelationViewSet']
|
||||||
|
|
||||||
|
|
||||||
class UserUserGroupRelationViewSet(JMSBulkRelationModelViewSet):
|
class UserUserGroupRelationViewSet(JMSBulkRelationModelViewSet):
|
||||||
|
perm_model = UserGroup
|
||||||
filterset_fields = ('user', 'usergroup')
|
filterset_fields = ('user', 'usergroup')
|
||||||
search_fields = filterset_fields
|
search_fields = filterset_fields
|
||||||
serializer_class = serializers.UserUserGroupRelationSerializer
|
serializer_class = serializers.UserUserGroupRelationSerializer
|
||||||
|
|
Loading…
Reference in New Issue