fix: 修改api doc bug

v2.20
feng626 2022-04-20 20:39:41 +08:00 committed by Jiangjie.Bai
parent d5e7f06653
commit bb163b088f
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class CommandExecutionViewSet(RootOrgViewMixin, viewsets.ModelViewSet):
raise ValidationError({"hosts": msg})
def check_permissions(self, request):
if not settings.SECURITY_COMMAND_EXECUTION and request.user.is_common_user:
if not settings.SECURITY_COMMAND_EXECUTION:
return self.permission_denied(request, "Command execution disabled")
return super().check_permissions(request)