Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin section #537

Open
fey opened this issue Jul 31, 2024 · 1 comment
Open

Add admin section #537

fey opened this issue Jul 31, 2024 · 1 comment

Comments

@fey
Copy link
Contributor

fey commented Jul 31, 2024

Problem description

Now there is no way to manage users and snippets. All operations are performed through working with the database

Proposed solution

Create a simple admin panel interface. Don't use SPA (React), try pug templates. The section should be located on the path /admin and contain two pages /admin/users, /admin/snippets with the output of these sections. For users add a new column-flag whether the user is an administrator or not

@SidorovVladimir
Copy link
Contributor

Working on a task.

@fey fey moved this from 🔖 Ready to 🏗 In progress in Runit Jan 9, 2025
SidorovVladimir added a commit to SidorovVladimir/runit that referenced this issue Jan 11, 2025
- The migration file has been added, the isAdmin column has been added to the users table.
- The migration file implements the logic of installing the admin for the email specified in the environment variable ADMIN_EMAIL.
- The admin module has been added.
- Added a controller to get a user template.
- In the user creation method, the logic of installing the admin during registration has been added.

На данном этапе:
- Добавлен файл миграции, добавлена колонка isAdmin в таблицу users.
- В файле миграции реализована логика установки админа для емейла указанного в переменной окружения ADMIN_EMAIL.
- Добавлен admin module.
- Добавлен контроллер для получения шаблона пользователей.
- В методе создания пользователя добавлена логика установки админа при регистрации.
SidorovVladimir added a commit to SidorovVladimir/runit that referenced this issue Jan 19, 2025
SidorovVladimir added a commit to SidorovVladimir/runit that referenced this issue Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants