From ba8ed23292de48b9cd003db9f6e549715a2665ad Mon Sep 17 00:00:00 2001 From: liuzheng712 Date: Mon, 2 Nov 2015 15:51:18 +0800 Subject: [PATCH] add the @login_required(login_url='/login') --- juser/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/juser/views.py b/juser/views.py index aafa10d15..47dc48443 100644 --- a/juser/views.py +++ b/juser/views.py @@ -5,6 +5,7 @@ # import random # from Crypto.PublicKey import RSA import uuid as uuid_r +from django.contrib.auth.decorators import login_required from django.db.models import Q from django.template import RequestContext @@ -212,6 +213,7 @@ def group_edit(request): # return HttpResponseRedirect('/juser/group_list/') +@login_required(login_url='/login') @require_role(role='super') def user_add(request): error = ''