Update admin bypass condition in auth_from function for better logging control

1 parent 6b22a423
......@@ -26,7 +26,7 @@ def auth_from(request, field=None):
raise JsonRpcInvalidLoginError
# bypass cek authentication for development
if http_userid == 'admin' and request.devel:
if http_userid == 'admin' and log.parent.level==logging.DEBUG:
return user
time_stamp = validate_time(request)
......@@ -88,9 +88,6 @@ def get_user_device(request, user_id):
# user_device = renew_token(user_device)
return user_device
def auth_device(request):
env = request.environ
log.info(env)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!