mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
698 B
19 lines
698 B
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
|
|
from .base import BaseUserAssetAccountACLSerializer as BaseSerializer
|
|
from ..models import ConnectMethodACL
|
|
from ..const import ActionChoices
|
|
|
|
__all__ = ["ConnectMethodACLSerializer"]
|
|
|
|
|
|
class ConnectMethodACLSerializer(BaseSerializer, BulkOrgResourceModelSerializer):
|
|
class Meta(BaseSerializer.Meta):
|
|
model = ConnectMethodACL
|
|
fields = [
|
|
i for i in BaseSerializer.Meta.fields + ['connect_methods']
|
|
if i not in ['assets', 'accounts']
|
|
]
|
|
action_choices_exclude = BaseSerializer.Meta.action_choices_exclude + [
|
|
ActionChoices.review, ActionChoices.accept
|
|
]
|