From a1fd3b1ecb782f0ffa646c7617965fe44693a56d Mon Sep 17 00:00:00 2001 From: Aaron3S Date: Mon, 16 Dec 2024 18:16:30 +0800 Subject: [PATCH] feat: exclude face action for login acl and command acl --- apps/acls/serializers/command_acl.py | 4 +++- apps/acls/serializers/login_acl.py | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/acls/serializers/command_acl.py b/apps/acls/serializers/command_acl.py index 44fd8e0ed..13a90129d 100644 --- a/apps/acls/serializers/command_acl.py +++ b/apps/acls/serializers/command_acl.py @@ -32,7 +32,9 @@ class CommandFilterACLSerializer(BaseSerializer, BulkOrgResourceModelSerializer) class Meta(BaseSerializer.Meta): model = CommandFilterACL fields = BaseSerializer.Meta.fields + ['command_groups'] - action_choices_exclude = [ActionChoices.notice] + action_choices_exclude = [ActionChoices.notice, + ActionChoices.face_verify, + ActionChoices.face_online] class CommandReviewSerializer(serializers.Serializer): diff --git a/apps/acls/serializers/login_acl.py b/apps/acls/serializers/login_acl.py index 737e5269d..b31bbac9a 100644 --- a/apps/acls/serializers/login_acl.py +++ b/apps/acls/serializers/login_acl.py @@ -4,6 +4,7 @@ from common.serializers import MethodSerializer from orgs.mixins.serializers import BulkOrgResourceModelSerializer from .base import BaseUserACLSerializer from .rules import RuleSerializer +from ..const import ActionChoices from ..models import LoginACL __all__ = ["LoginACLSerializer"] @@ -17,6 +18,7 @@ class LoginACLSerializer(BaseUserACLSerializer, BulkOrgResourceModelSerializer): class Meta(BaseUserACLSerializer.Meta): model = LoginACL fields = BaseUserACLSerializer.Meta.fields + ['rules', ] + action_choices_exclude = [ActionChoices.face_online, ActionChoices.face_verify] def get_rules_serializer(self): return RuleSerializer()