peppa/openspec/changes/pep-68-local-users/tasks.md
Асель 414e4500e4 PEP-68: local users without Gitea — password login, superadmin management
- users.password_hash/password_set_at/disabled_at (migration 0002_local_users)
- core/local-users.ts: scrypt, passwordLogin with attempt limits, create/reset/disable
- isSuperadmin(db, user) = platform.admins; isUserAllowed honours disabled_at
- web: /auth/password + login form, /users for superadmins, Settings → password
- Gitea login with a local user's login is refused (giteaLoginRefusal)
- local users: projects in peppa-bot namespace, members without Gitea collaboration
- CLI: peppa user add|passwd|disable|enable; tests in testkit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:20:21 +05:00

11 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tasks: PEP-68
- [x] 1.1 Схема: `users.password_hash`, `password_set_at`, `disabled_at`; миграция `pnpm db:generate`
- [x] 1.2 core: `local-users.ts` — scrypt, `passwordLogin` с ограничением попыток, `createLocalUser`, `setUserPassword`, `changeOwnPassword`, `setUserDisabled`; `isSuperadmin`; `isUserAllowed` учитывает отключение
- [x] 1.3 web: `POST /auth/password`, форма на `/login`; отказ в колбэке Gitea для логина локального пользователя
- [x] 1.4 web: `/users` для суперадмина (создать, сбросить пароль, отключить/включить), пункт меню; «Настройки → Пароль», «нет аккаунта Gitea»
- [x] 1.5 Проект локального пользователя в пространстве `peppa-bot`; `shareProject` для локальных логинов
- [x] 1.6 CLI `peppa user add|passwd|disable|enable`
- [x] 1.7 Тесты testkit: вход по паролю, неверный пароль и пауза, отключение, Gitea-логин занят, суперадмин, шеринг локальному
- [x] 1.8 AGENTS.md, «Помощь», `openspec validate`