feat: роли customer/admin, админ-панель, admin@site.com

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-17 11:19:01 +03:00
parent 58c789d5f8
commit f24f35d0fc
18 changed files with 497 additions and 9 deletions
+3
View File
@@ -23,6 +23,9 @@
<% if (cartCount > 0) { %><span class="badge"><%= cartCount %></span><% } %>
</a>
<% if (user) { %>
<% if (typeof isAdmin !== 'undefined' && isAdmin) { %>
<a href="/admin" class="nav__link nav__admin">Админ</a>
<% } %>
<a href="/account" class="nav__link"><%= user.name %></a>
<form action="/logout" method="post" class="inline-form">
<button type="submit" class="btn btn--ghost btn--sm">Выйти</button>