fix: 去掉命令告警开关

pull/6286/head
xinwen 2021-06-15 20:20:47 +08:00 committed by 老广
parent f6273450bb
commit 1a30675a86
1 changed files with 1 additions and 3 deletions

View File

@ -204,8 +204,6 @@ class InsecureCommandAlertAPI(generics.CreateAPIView):
serializer.is_valid(raise_exception=True)
commands = serializer.validated_data
for command in commands:
if command['risk_level'] >= settings.SECURITY_INSECURE_COMMAND_LEVEL and \
settings.SECURITY_INSECURE_COMMAND and \
settings.SECURITY_INSECURE_COMMAND_EMAIL_RECEIVER:
if command['risk_level'] >= settings.SECURITY_INSECURE_COMMAND_LEVEL:
CommandAlertMessage(command).publish_async()
return Response()