[Fix] 日志审计/FTP日志 (#4109)

pull/4110/head
xinwen 2020-06-16 16:33:53 +08:00 committed by GitHub
parent 0ccd806eca
commit 3318df1771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
from rest_framework.mixins import ListModelMixin
from rest_framework.mixins import ListModelMixin, CreateModelMixin
from django.db.models import F, Value
from django.db.models.functions import Concat
@ -15,7 +15,9 @@ from .serializers import FTPLogSerializer, UserLoginLogSerializer, CommandExecut
from .serializers import OperateLogSerializer, PasswordChangeLogSerializer, CommandExecutionHostsRelationSerializer
class FTPLogViewSet(ListModelMixin, OrgGenericViewSet):
class FTPLogViewSet(CreateModelMixin,
ListModelMixin,
OrgGenericViewSet):
model = FTPLog
serializer_class = FTPLogSerializer
permission_classes = (IsOrgAdminOrAppUser | IsOrgAuditor,)