Browse Source

perf: 命令过滤中 去掉通知动作 (#11851)

Co-authored-by: feng <1304903146@qq.com>
pull/11853/head
fit2bot 1 year ago committed by GitHub
parent
commit
7dcae1e05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      apps/acls/serializers/command_acl.py

4
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):

Loading…
Cancel
Save