Example #1
0
 def _wrapper(request, *args, **kw):
   if request.user:
     util.notice(request, 'You are already logged in')
     raise exception.LogoutRequiredException()
   return handler(request, *args, **kw)
Example #2
0
 def _wrapper(request, *args, **kw):
   if not request.user:
     util.notice(request, 'Please login')
     raise exception.LoginRequiredException()
   return handler(request, *args, **kw)