mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge branch 'chore-admin-file-structure' of gurusainath:makeplane/plane into chore-admin-file-structure
This commit is contained in:
commit
cf17761c5c
@ -7,6 +7,12 @@ def auth_exception_handler(exc, context):
|
||||
response = exception_handler(exc, context)
|
||||
# Check if an AuthenticationFailed exception is raised.
|
||||
if isinstance(exc, NotAuthenticated):
|
||||
response.status_code = 401
|
||||
# Return 403 if the users me api fails
|
||||
request = context["request"]
|
||||
if request.path == "/api/users/me/":
|
||||
response.status_code = 403
|
||||
# else return 401
|
||||
else:
|
||||
response.status_code = 401
|
||||
|
||||
return response
|
||||
|
Loading…
Reference in New Issue
Block a user