remove restriction when using open api

This commit is contained in:
zema1 committed 2018-12-16 10:36:43 +08:00
1 parent 745dba8cad
commit 03c68419b0
5 files changed
+9 -5

No files matched your search

+1
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