Skip to content

Commit

Permalink
Remove duplicated route
Browse files Browse the repository at this point in the history
Resolves #5434
  • Loading branch information
eloquence committed Aug 7, 2020
1 parent f1b495e commit 23b5308
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions securedrop/journalist_app/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,6 @@ def edit_user(user_id):
return render_template("edit_account.html", user=user,
password=password)

@view.route('/edit/<int:user_id>/new-password', methods=('POST',))
@admin_required
def set_password(user_id):
try:
user = Journalist.query.get(user_id)
except NoResultFound:
abort(404)

password = request.form.get('password')
if set_diceware_password(user, password) is not False:
if user.last_token is not None:
revoke_token(user, user.last_token)
user.session_nonce += 1
db.session.commit()

return redirect(url_for('admin.edit_user', user_id=user_id))

@view.route('/delete/<int:user_id>', methods=('POST',))
@admin_required
def delete_user(user_id):
Expand Down

0 comments on commit 23b5308

Please sign in to comment.