forked from Github-Mirrors/canaille
Minor refactoring
This commit is contained in:
parent
0fda3bc3c0
commit
e57cd9a138
1 changed files with 8 additions and 8 deletions
|
@ -189,14 +189,6 @@ def profile_creation(user):
|
|||
)
|
||||
|
||||
|
||||
@bp.route("/impersonate/<username>")
|
||||
@admin_needed()
|
||||
def impersonate(user, username):
|
||||
u = User.get(username) or abort(404)
|
||||
u.login()
|
||||
return redirect(url_for("account.index"))
|
||||
|
||||
|
||||
@bp.route("/profile/<username>", methods=("GET", "POST"))
|
||||
@user_needed()
|
||||
def profile_edition(user, username):
|
||||
|
@ -316,6 +308,14 @@ def profile_delete(user, username):
|
|||
return redirect(url_for("account.users"))
|
||||
|
||||
|
||||
@bp.route("/impersonate/<username>")
|
||||
@admin_needed()
|
||||
def impersonate(user, username):
|
||||
u = User.get(username) or abort(404)
|
||||
u.login()
|
||||
return redirect(url_for("account.index"))
|
||||
|
||||
|
||||
@bp.route("/reset", methods=["GET", "POST"])
|
||||
def forgotten():
|
||||
form = ForgottenPasswordForm(request.form)
|
||||
|
|
Loading…
Reference in a new issue