修复BUG(提交错误): DEMO_ENV
parent
070d3e04ad
commit
a37550176c
|
@ -141,7 +141,7 @@ class PermissionModeMiddleware(MiddlewareMixin):
|
|||
def process_view(self, request, view_func, view_args, view_kwargs):
|
||||
# 判断环境变量中,是否为演示模式(正常可忽略此判断)
|
||||
white_list = ['/admin/logout/', '/admin/login/']
|
||||
if not os.getenv('DEMO_ENV') and not request.method in ['GET', 'OPTIONS'] and request.path not in white_list:
|
||||
if os.getenv('DEMO_ENV') and not request.method in ['GET', 'OPTIONS'] and request.path not in white_list:
|
||||
return ErrorJsonResponse(data={}, msg=f'演示模式,不允许操作!')
|
||||
|
||||
if not settings.INTERFACE_PERMISSION:
|
||||
|
|
Loading…
Reference in New Issue