2023-06-07 09:39:56 +00:00
|
|
|
from orgs.mixins.serializers import BulkOrgResourceModelSerializer
|
|
|
|
from .base import BaseUserAssetAccountACLSerializer as BaseSerializer
|
|
|
|
from ..models import ConnectMethodACL
|
2023-07-17 07:53:35 +00:00
|
|
|
from ..const import ActionChoices
|
2023-06-07 09:39:56 +00:00
|
|
|
|
|
|
|
__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']
|
|
|
|
]
|
2023-07-17 07:53:35 +00:00
|
|
|
action_choices_exclude = BaseSerializer.Meta.action_choices_exclude + [
|
|
|
|
ActionChoices.review, ActionChoices.accept
|
|
|
|
]
|