feat(rbac): pilot scope → только /trade-in/** #587
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#587
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/rbac-pilot-tradein-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Decision 2026-05-26: pilot-аккаунты пилот-программы получают доступ только к разделу Trade-In (оценка вторички). Landing (
/), Analytics, Site Finder, Concept — admin-only.Изменения
auth/roles.yaml— pilot.paths суженТакже синхронизированы с VPS local edits
caddy/users.caddy.snippet— regen'd user1..user10 hashes + admintest + pilottest entriesauth/roles.yamlusers: блок —admintest: adminиpilottest: pilot(temp QA)Без этого
deploy.yml(git reset --hard origin/main) стёр бы локальные правки на VPS и QA accounts отвалились бы.Effect на UX
//trade-in/admin/scrapePilot login flow: Caddy basic_auth → main frontend → useMe → /me → scope (allowed=/trade-in/**). RouteGuard на
/→<NoAccessScreen variant="path" path="/">. Pilot должен открыватьhttps://gendsgn.ru/trade-in/напрямую.Тесты
backend/tests/test_rbac.py: 20/20 pass (test_is_path_allowed_pilot_excludes_admin переписан в_pilot_only_tradein, test_get_user_scope_pilot обновлён)tradein-mvp/backend/tests/test_rbac.py: 20/20 pass (mirror)frontend/src/lib/__tests__/isPathAllowed.test.ts: parity tests обновленыTest plan (post-deploy)
curl -u pilottest:7d8b3c267aa3 https://gendsgn.ru/api/v1/me→allowed_paths: ["/trade-in/**", "/trade-in/api/v1/**"]pilottest→/→ fullscreen «Доступа нет»,/trade-in→ работаетadmintest→ все страницы открываютсяFollow-up (optional)
Mожно добавить auto-redirect в RouteGuard: если pilot landing-path в denied, redirect на первый allowed (
/trade-in). Отдельный PR — не блокирует этот.