Skip to content
Browse files

Normalize 403 status code response text (Access forbidden.)

  • Loading branch information...
1 parent f4cc6ae commit 68c7df0b275c356a89f1f8e17135ec64183784e8 @denya committed
Showing with 2 additions and 2 deletions.
  1. +1 −1 adrest/mixin/auth.py
  2. +1 −1 adrest/views.py
View
2 adrest/mixin/auth.py
@@ -32,5 +32,5 @@ def check_rights(self, resources, method):
try:
assert self.auth.test_rights(mresources, method)
except AssertionError:
- raise HttpError("You cannot do it.", status=status.HTTP_403_FORBIDDEN)
+ raise HttpError("Access forbidden.", status=status.HTTP_403_FORBIDDEN)
return True
View
2 adrest/views.py
@@ -239,7 +239,7 @@ def check_owners(self, **resources):
except (AssertionError, ObjectDoesNotExist):
# 403 Error if there is error in parent-children relationship
- raise HttpError("Access forbiden.", status=status.HTTP_403_FORBIDDEN)
+ raise HttpError("Access forbidden.", status=status.HTTP_403_FORBIDDEN)
except StopIteration:
pass

0 comments on commit 68c7df0

Please sign in to comment.
Something went wrong with that request. Please try again.