From 3eba22eea4ce0859600791b3c48caa8b504179a0 Mon Sep 17 00:00:00 2001 From: Craig Blaszczyk Date: Tue, 26 Jul 2011 12:03:27 +0100 Subject: [PATCH] add permission denied error message --- djangorestframework/permissions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/djangorestframework/permissions.py b/djangorestframework/permissions.py index 2540218fd..cf131e0b6 100644 --- a/djangorestframework/permissions.py +++ b/djangorestframework/permissions.py @@ -30,6 +30,10 @@ _403_NOT_LOGGED_IN_RESPONSE = ErrorResponse( status.HTTP_403_FORBIDDEN, {'detail': 'You need to login to access this resource.'}) +_403_PERMISSION_DENIED_RESPONSE = ErrorResponse( + status.HTTP_403_FORBIDDEN, + {'detail': 'You do not have permission to access this resource.'}) + _503_SERVICE_UNAVAILABLE = ErrorResponse( status.HTTP_503_SERVICE_UNAVAILABLE, {'detail': 'request was throttled'})