remove restriction when using open api

This commit is contained in:
zema1
2018-12-16 10:30:19 +08:00
parent 745dba8cad
commit 03c68419b0
5 changed files with 9 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ class APITokenAuthMiddleware(MiddlewareMixin):
try:
request.user = User.objects.get(open_api_appkey=appkey, open_api=True, is_disabled=False)
request.csrf_processing_done = True
request.auth_method = "api_key"
except User.DoesNotExist:
pass