Skip to content

Commit

Permalink
Staff Panel was showing for non mods
Browse files Browse the repository at this point in the history
Due to this it also meant users not logged in received an error due to further checks already there that relied on a user check before.
  • Loading branch information
carolinaisslaying authored Oct 26, 2020
1 parent f5e419d commit e91989b
Showing 1 changed file with 45 additions and 43 deletions.
88 changes: 45 additions & 43 deletions assets/Views/partials/nav.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -147,61 +147,63 @@
</div>

<div class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable">
<div class="navbar-link" tabindex="0">
<span class="icon iconalign">
<i class="fad fa-cogs" aria-hidden="true"></i>
</span>
<span id="staffPanelDropdownTitle"><%= __("common.nav.me.staffPanel") %></span>
</div>

<div id="moreDropdown" class="navbar-dropdown is-hidden-mobile">
<a class="navbar-item" href="<%= linkPrefix %>/staff">
<span class="icon iconalign">
<i class="fad fa-house" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.home") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/bot_queue">
<span class="icon iconalign">
<i class="fad fa-list-ul" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.queue") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/server_queue">
<% if (req.user && req.user.db.rank.mod) { %>
<div class="navbar-item has-dropdown is-hoverable">
<div class="navbar-link" tabindex="0">
<span class="icon iconalign">
<i class="fad fa-list-ul" aria-hidden="true"></i>
<i class="fad fa-cogs" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.server_queue") %></span>
</a>
<% if (req.user.db.rank.assistant === true) { %>
<a class="navbar-item" href="<%= linkPrefix %>/staff/invite_queue">
<span class="icon iconalign">
<i class="fad fa-list-ul" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.invite_queue") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/staff-manager">
<span id="staffPanelDropdownTitle"><%= __("common.nav.me.staffPanel") %></span>
</div>
<div id="moreDropdown" class="navbar-dropdown is-hidden-mobile">
<a class="navbar-item" href="<%= linkPrefix %>/staff">
<span class="icon iconalign">
<i class="fad fa-users-cog" aria-hidden="true"></i>
<i class="fad fa-house" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.manager") %></span>
<span><%= __("page.staff.home") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/audit">
<a class="navbar-item" href="<%= linkPrefix %>/staff/bot_queue">
<span class="icon iconalign">
<i class="fad fa-archive" aria-hidden="true"></i>
<i class="fad fa-list-ul" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.audit") %></span>
<span><%= __("page.staff.queue") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/announce">
<a class="navbar-item" href="<%= linkPrefix %>/staff/server_queue">
<span class="icon iconalign">
<i class="fad fa-megaphone" aria-hidden="true"></i>
<i class="fad fa-list-ul" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.announcer") %></span>
<span><%= __("page.staff.server_queue") %></span>
</a>
<% } %>
<% if (req.user.db.rank.assistant === true) { %>
<a class="navbar-item" href="<%= linkPrefix %>/staff/invite_queue">
<span class="icon iconalign">
<i class="fad fa-list-ul" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.invite_queue") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/staff-manager">
<span class="icon iconalign">
<i class="fad fa-users-cog" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.manager") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/audit">
<span class="icon iconalign">
<i class="fad fa-archive" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.audit") %></span>
</a>
<a class="navbar-item" href="<%= linkPrefix %>/staff/announce">
<span class="icon iconalign">
<i class="fad fa-megaphone" aria-hidden="true"></i>
</span>
<span><%= __("page.staff.announcer") %></span>
</a>
<% } %>
</div>
</div>
</div>
<% } %>
<div class="navbar-item has-dropdown is-hoverable">
<div class="navbar-link" tabindex="0">
<span class="icon iconalign">
Expand Down

0 comments on commit e91989b

Please sign in to comment.