diff options
author | rubenwardy <rw@rubenwardy.com> | 2018-05-23 18:42:59 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2018-05-23 18:42:59 +0100 |
commit | da33b106123ec7595008869398718df3d549bb9d (patch) | |
tree | a22d988058072a6d54f8170c0d11a53f2294561b | |
parent | 5c1320042975016ea0b2ad122f1d1712bd16dacd (diff) | |
download | cheatdb-da33b106123ec7595008869398718df3d549bb9d.tar.xz |
Reduce access restrictions on user list
-rw-r--r-- | app/templates/base.html | 1 | ||||
-rw-r--r-- | app/views/users.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/templates/base.html b/app/templates/base.html index f2ece29..07fe1fb 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -59,6 +59,7 @@ </li> {% if current_user.canAccessTodoList() %} <li><a href="{{ url_for('todo_page') }}">Work Queue</a></li> + <li><a href="{{ url_for('user_list_page') }}">User list</a></li> {% endif %} {% if current_user.rank == current_user.rank.ADMIN %} <li><a href="{{ url_for('admin_page') }}">Admin</a></li> diff --git a/app/views/users.py b/app/views/users.py index c2460e1..8dec1ba 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -37,7 +37,7 @@ class UserProfileForm(FlaskForm): submit = SubmitField("Save") @app.route("/users/", methods=["GET"]) -@rank_required(UserRank.MODERATOR) +@login_required def user_list_page(): users = User.query.order_by(db.asc(User.rank), db.asc(User.display_name)).all() return render_template("users/list.html", users=users) |