Ejemplo n.º 1
0
 def _decorated(request, *args, **kwargs):
     if not request.user.is_staff:
         raise Http404
     if ENABLE_SUDO_MODE and not sudo_mode_check(request):
         return HttpResponseRedirect(
             reverse('sys_sudo_mode') + '?next=' + urlquote(request.get_full_path()))
     return func(request, *args, **kwargs)
Ejemplo n.º 2
0
 def _decorated(request, *args, **kwargs):
     if not request.user.is_staff:
         raise Http404
     if ENABLE_SUDO_MODE and not sudo_mode_check(request):
         return HttpResponseRedirect(
             reverse('sys_sudo_mode') + '?next=' + urlquote(request.get_full_path()))
     return func(request, *args, **kwargs)