diff --git a/apps/jumpserver/settings.py b/apps/jumpserver/settings.py index 37c14dbf1..4146bfdac 100644 --- a/apps/jumpserver/settings.py +++ b/apps/jumpserver/settings.py @@ -261,10 +261,10 @@ LOGGING = { 'handlers': ['console', 'file'], 'level': "INFO", }, - # 'django.db': { - # 'handlers': ['console', 'file'], - # 'level': 'DEBUG' - # } + 'django.db': { + 'handlers': ['console', 'file'], + 'level': 'DEBUG' + } } } @@ -322,6 +322,7 @@ REST_FRAMEWORK = { 'common.permissions.IsOrgAdmin', ), 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.BasicAuthentication', 'users.authentication.AccessKeyAuthentication', 'users.authentication.AccessTokenAuthentication', 'users.authentication.PrivateTokenAuthentication', diff --git a/apps/perms/api.py b/apps/perms/api.py index d1ea10cf1..c0edc09f2 100644 --- a/apps/perms/api.py +++ b/apps/perms/api.py @@ -5,7 +5,6 @@ from django.shortcuts import get_object_or_404 from rest_framework.views import APIView, Response from rest_framework.generics import ListAPIView, get_object_or_404, RetrieveUpdateAPIView from rest_framework import viewsets -from rest_framework.pagination import LimitOffsetPagination from common.utils import set_or_append_attr_bulk, get_object_or_none from common.permissions import IsValidUser, IsOrgAdmin, IsOrgAdminOrAppUser