diff --git a/smash/web/decorators.py b/smash/web/decorators.py index c678bfb8a0c706f65e4239ceb77ecc22eab73e0e..b3124a1fb1f939be60a2b623405a514f4015a3a7 100644 --- a/smash/web/decorators.py +++ b/smash/web/decorators.py @@ -110,7 +110,7 @@ class PermissionDecorator: permissions = roles[0].permissions.filter(codename=self.perm_codename) if len(permissions) > 0: return func(thing, *args, **kwargs) - messages.error(request, 'You are not authorized to view this page. Request permissions to the system administrator.') + messages.error(request, 'You are not authorized to view this page or perform this action. Request permissions to the system administrator.') #avoid loops if the HTTP_REFERER header is set to the visited URL http_referer = request.META.get('HTTP_REFERER', 'web.views.index') if http_referer == request.build_absolute_uri() or http_referer == request.path: