diff --git a/app/models.py b/app/models.py
index 544a14ec..f3ab06a4 100644
--- a/app/models.py
+++ b/app/models.py
@@ -120,6 +120,11 @@ class User(db.Model, UserMixin):
self.display_name = username
self.rank = UserRank.NOT_JOINED
+ def canAccessTodoList(self):
+ return Permission.APPROVE_NEW.check(self) or \
+ Permission.APPROVE_RELEASE.check(self) or \
+ Permission.APPROVE_CHANGES.check(self)
+
def isClaimed(self):
return self.rank.atLeast(UserRank.NEW_MEMBER)
diff --git a/app/templates/base.html b/app/templates/base.html
index 025bf820..504563ef 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -41,6 +41,7 @@
{% if current_user.is_authenticated %}
- ({{ current_user.notifications | length }})
+ - +
-
Profile
+ {% if current_user.canAccessTodoList() %}
+ - Work Queue
+ {% endif %}
{% if current_user.rank == current_user.rank.ADMIN %}
- Admin
{% endif %}
diff --git a/app/views/packages.py b/app/views/packages.py
index 70c36cf3..087a83fe 100644
--- a/app/views/packages.py
+++ b/app/views/packages.py
@@ -63,13 +63,6 @@ def packages_page():
return render_template("packages/list.html", title=title, packages=query.all(), \
query=search, tags=tags, type=None if type is None else type.toName())
-
-def canSeeWorkQueue():
- return Permission.APPROVE_NEW.check(current_user) or \
- Permission.APPROVE_RELEASE.check(current_user) or \
- Permission.APPROVE_CHANGES.check(current_user)
-
-@menu.register_menu(app, ".todo", "Work Queue", order=20, visible_when=canSeeWorkQueue)
@app.route("/todo/")
@login_required
def todo_page():
@@ -138,7 +131,6 @@ class PackageForm(FlaskForm):
forums = IntegerField("Forum Topic ID", [InputRequired(), NumberRange(0,999999)])
submit = SubmitField("Save")
-@menu.register_menu(app, ".new", "Create", order=21, visible_when=lambda: current_user.is_authenticated)
@app.route("/packages/new/", methods=["GET", "POST"])
@app.route("/packages///edit/", methods=["GET", "POST"])
@login_required