--- a/src/cm/security.py Thu Jul 15 16:23:58 2010 +0200
+++ b/src/cm/security.py Thu Jul 15 17:07:15 2010 +0200
@@ -198,8 +198,7 @@
def _dec(view_func):
def _check_global_perm(request, *args, **kwargs):
if must_be_logged_in and not is_authenticated(request):
- login_url = reverse('login')
- return HttpResponseRedirect('%s?%s=%s' % (login_url, redirect_field_name, urlquote(request.get_full_path())))
+ raise UnauthorizedException('Should be logged in')
if has_perm(request, perm_name, text=None):
return view_func(request, *args, **kwargs)
@@ -229,8 +228,7 @@
if must_be_logged_in and not is_authenticated(request):
if not api:
- login_url = reverse('login')
- return HttpResponseRedirect('%s?%s=%s' % (login_url, redirect_field_name, urlquote(request.get_full_path())))
+ raise UnauthorizedException('Should be logged in')
else:
return rc.FORBIDDEN