diff --git a/apps/acls/serializers/command_acl.py b/apps/acls/serializers/command_acl.py index dde953277..44fd8e0ed 100644 --- a/apps/acls/serializers/command_acl.py +++ b/apps/acls/serializers/command_acl.py @@ -8,6 +8,7 @@ from orgs.mixins.serializers import BulkOrgResourceModelSerializer from orgs.utils import tmp_to_root_org from terminal.models import Session from .base import BaseUserAssetAccountACLSerializer as BaseSerializer +from ..const import ActionChoices __all__ = ["CommandFilterACLSerializer", "CommandGroupSerializer", "CommandReviewSerializer"] @@ -31,8 +32,7 @@ class CommandFilterACLSerializer(BaseSerializer, BulkOrgResourceModelSerializer) class Meta(BaseSerializer.Meta): model = CommandFilterACL fields = BaseSerializer.Meta.fields + ['command_groups'] - # 默认都支持所有的 actions - action_choices_exclude = [] + action_choices_exclude = [ActionChoices.notice] class CommandReviewSerializer(serializers.Serializer):