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