Changeset a3169f5 in Klonkt for src/views/partials


Ignore:
Timestamp:
06/14/2026 06:35:59 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
ce8c8c2
Parents:
5e95aac
Message:

fix: viewer now sees the Admin link too (canSeeBeheer)

The Admin link was hidden for a viewer (nav only showed it for god/admin/site
owner), while the routes do allow a viewer read-only access. Single source of
truth canSeeBeheer (god/admin/viewer/owner) in render.js, used in topnav,
hub-nav, and profile sheet.

Co-Authored-By: Claude <noreply@…>

Location:
src/views/partials
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/profile-sheet.ejs

    r5e95aac ra3169f5  
    5656        </a>
    5757      </li>
    58       <% if (_isAdmin) { %>
     58      <% if (typeof canSeeBeheer !== 'undefined' && canSeeBeheer) { %>
    5959      <li role="none">
    6060        <a href="/admin" class="profile-sheet-item" role="menuitem" data-close-sheet>
  • src/views/partials/topnav.ejs

    r5e95aac ra3169f5  
    115115                <span>Account</span>
    116116              </a>
    117               <% if (user.role === 'god' || user.role === 'admin' || (typeof userOwnsSite !== 'undefined' && userOwnsSite)) { %>
     117              <% if (typeof canSeeBeheer !== 'undefined' && canSeeBeheer) { %>
    118118                <a href="/admin" role="menuitem" class="udi">
    119119                  <svg class="udi-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 3h7v7H3z"/><path d="M14 3h7v7h-7z"/><path d="M14 14h7v7h-7z"/><path d="M3 14h7v7H3z"/></svg>
Note: See TracChangeset for help on using the changeset viewer.