From 31a3e3b177c955a8ce87f4f30800a9dadf3a8472 Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 21 Feb 2023 19:35:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20ftp=20=E5=AE=A1?= =?UTF-8?q?=E8=AE=A1=E6=97=A5=E5=BF=97=E4=B8=8A=E4=BC=A0=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audits/api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/audits/api.py b/apps/audits/api.py index e1aff002a..968fe19db 100644 --- a/apps/audits/api.py +++ b/apps/audits/api.py @@ -10,7 +10,7 @@ from rest_framework.permissions import IsAuthenticated from common.drf.filters import DatetimeRangeFilter from common.plugins.es import QuerySet as ESQuerySet from common.utils import is_uuid -from orgs.mixins.api import OrgReadonlyModelViewSet +from orgs.mixins.api import OrgReadonlyModelViewSet, OrgModelViewSet from orgs.utils import current_org, tmp_to_root_org from users.models import User from .backends import TYPE_ENGINE_MAPPING @@ -35,7 +35,7 @@ class JobAuditViewSet(OrgReadonlyModelViewSet): ordering = ['-date_start'] -class FTPLogViewSet(OrgReadonlyModelViewSet): +class FTPLogViewSet(OrgModelViewSet): model = FTPLog serializer_class = FTPLogSerializer extra_filter_backends = [DatetimeRangeFilter] @@ -45,6 +45,7 @@ class FTPLogViewSet(OrgReadonlyModelViewSet): filterset_fields = ['user', 'asset', 'account', 'filename'] search_fields = filterset_fields ordering = ['-date_start'] + http_method_names = ['post', 'get', 'head', 'options'] class UserLoginCommonMixin: