feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="ru" data-theme="light">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>{% block title %}ЭВОСИНК{% endblock %}</title>
|
|
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
|
|
|
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
<header class="site-header">
|
|
|
|
|
|
<nav class="container">
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href="/" class="brand-logo">ЭВОСИНК</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<ul class="nav-links">
|
|
|
|
|
|
{% if user %}
|
|
|
|
|
|
<li><a href="/connections">Подключения</a></li>
|
2026-05-01 18:09:11 +03:00
|
|
|
|
<li><a href="/catalog">Каталог Эвотор</a></li>
|
|
|
|
|
|
<li><a href="/vk-catalog/albums">Каталог ВК</a></li>
|
feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
<li><a href="/sync">Синхронизация</a></li>
|
|
|
|
|
|
{% if user.role in ('admin', 'system') %}
|
|
|
|
|
|
<li><a href="/admin/users"><i class="bi bi-shield-lock"></i> Админ</a></li>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
<li><a href="/profile"><i class="bi bi-person-circle"></i> Личный кабинет</a></li>
|
|
|
|
|
|
<li><a href="/logout" class="secondary">Выход</a></li>
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
<li><a href="/login">Вход</a></li>
|
|
|
|
|
|
<li><a href="/register">Регистрация</a></li>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
{% if user %}
|
|
|
|
|
|
<details class="mobile-menu">
|
|
|
|
|
|
<summary role="button" class="outline secondary icon-btn"><i class="bi bi-list"></i></summary>
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href="/connections">Подключения</a></li>
|
2026-05-01 18:09:11 +03:00
|
|
|
|
<li><a href="/catalog">Каталог Эвотор</a></li>
|
|
|
|
|
|
<li><a href="/vk-catalog/albums">Каталог ВК</a></li>
|
feat: Evotor user lifecycle, RBAC, admin panel
- Receive Evotor webhooks: POST /user/create, /user/verify, /user/token
- Create users in pending status; match to existing users by email/phone
- Send invite link via Celery notification task; user sets password at /invite
- Abstract EmailProvider/SMSProvider with ConsoleEmailProvider default
- Role-based access control: role enum on users + roles/permissions tables
- Admin panel: /admin/users (list, filter, search, paginate), user detail card
with activate/suspend/reset-password/send-invite/edit/delete actions
- Admin roles management: /admin/roles with per-role permission assignment
- Extend user profile card: role, status, Evotor ID, email confirmation badge
- Auth routes: register, login, logout, confirm-email, forgot/reset password
- Alembic migrations 0002 (full schema + new fields) and 0003 (RBAC + seeds)
- Port Pico CSS + Bootstrap Icons UI from Node.js commit (854c912)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:25 +03:00
|
|
|
|
<li><a href="/sync">Синхронизация</a></li>
|
|
|
|
|
|
{% if user.role in ('admin', 'system') %}
|
|
|
|
|
|
<li><a href="/admin/users">Админ</a></li>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
<li><a href="/profile">Личный кабинет</a></li>
|
|
|
|
|
|
<li><a href="/logout">Выход</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</details>
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
<details class="mobile-menu">
|
|
|
|
|
|
<summary role="button" class="outline secondary icon-btn"><i class="bi bi-list"></i></summary>
|
|
|
|
|
|
<ul>
|
|
|
|
|
|
<li><a href="/login">Вход</a></li>
|
|
|
|
|
|
<li><a href="/register">Регистрация</a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</details>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
|
|
<main class="container py-4">
|
|
|
|
|
|
{% if errors %}
|
|
|
|
|
|
<div role="alert" class="alert alert-danger">
|
|
|
|
|
|
{% for error in errors %}
|
|
|
|
|
|
<p>{{ error }}</p>
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% if success %}
|
|
|
|
|
|
<div role="alert" class="alert alert-success">
|
|
|
|
|
|
<p>{{ success }}</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block content %}{% endblock %}
|
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
{% if jivosite_widget_id %}
|
|
|
|
|
|
<script src="//code.jivosite.com/widget/{{ jivosite_widget_id }}" async></script>
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/inputmask@5.0.9/dist/inputmask.min.js"></script>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
|
|
var phoneInputs = document.querySelectorAll('input[name="phone"]');
|
|
|
|
|
|
if (phoneInputs.length) {
|
|
|
|
|
|
Inputmask('+7 (999) 999-99-99', {
|
|
|
|
|
|
placeholder: '_',
|
|
|
|
|
|
showMaskOnHover: false,
|
|
|
|
|
|
clearMaskOnLostFocus: false
|
|
|
|
|
|
}).mask(phoneInputs);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
document.addEventListener('invalid', function(e) {
|
|
|
|
|
|
if (e.target.validity.valueMissing) {
|
|
|
|
|
|
e.target.setCustomValidity('Пожалуйста, заполните это поле');
|
|
|
|
|
|
} else if (e.target.validity.typeMismatch) {
|
|
|
|
|
|
e.target.setCustomValidity('Пожалуйста, введите корректное значение');
|
|
|
|
|
|
}
|
|
|
|
|
|
}, true);
|
|
|
|
|
|
document.addEventListener('input', function(e) {
|
|
|
|
|
|
if (e.target.required) e.target.setCustomValidity('');
|
|
|
|
|
|
}, true);
|
|
|
|
|
|
</script>
|
|
|
|
|
|
{% block scripts %}{% endblock %}
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|