Appearance
Current Plane Task
Project: myhoreca-pay
Project ID: 6d869637-4d3a-4836-9627-841d112da980
Issue: MHPAY-128
Issue ID: 01abdc61-b37c-4bab-aec3-783541c6d886
Import key: MHPAY-DOC-003
Epic: MHPAY-117 / MHPAY-RBAC-V2-000
Updated: 2026-07-28 (Plane metadata unchanged; out-of-band supplier-settlement handoff appended)
Title
Документация: RBAC/Tenancy v2 и admin UX
Meta
- State: Backlog (
a1e37f92-d88b-4344-ab04-f7619fba1cc7) - Priority: medium
- Assignee: ipuhlikov (
376734b1-f8f0-4e71-8a18-f6bf06dceee5) - Start date: 2026-07-06
- Target date: 2026-07-06
- Plane URL: https://dev.serty.top/myhoreca-pos/browse/MHPAY-128/
- Epic URL: https://dev.serty.top/myhoreca-pos/browse/MHPAY-117/
- Parent issue ID: bcd8b502-32ed-447a-a8e9-ae9f02739bac
- External source: myhoreca-pay-rbac-v2-import
- Depends on: all RBAC-V2 epic tasks
- MCP sync:
retrieve_work_item_by_identifier(project_identifier=MHPAY, issue_identifier=128, expand=assignees,labels,state)
Context
RBAC/Tenancy v2 implementation now includes active organization/Outlet context behavior, platform organization registry, platform users/admin UX, and targeted Playwright coverage for context switching and scoped dashboard data. Product, security, frontend, and architecture docs need to be synchronized with the implemented behavior.
Goal
Synchronize product/security/docs with RBAC v2 and admin list/detail UX.
Scope / What To Do
text
- Update `docs/docs/product/user-roles.md`:
- Document that mega users must select organization/Outlet context for operational routes.
- Update `docs/docs/security/permission-matrix.md`:
- Document platform organization registry and platform users pages.
- Update `docs/docs/architecture/scoped-rbac-and-tenancy.md`:
- Document v2 context rules.
- Update `docs/docs/frontend/overview.md`:
- Document platform/settings users routes.
- Update `docs/docs/architecture/architecture-decisions-plane-backlog-v1.md`:
- Reflect statuses of new tasks.Acceptance Criteria
text
- `cd docs && npm run build` passes.
- ADR-008 is linked from the relevant index.Targeted Inspection (initial)
text
AGENTS.md
codegraph/manifest.yaml
docs/docs/ai-agents/project-prompt.md
docs/docs/ai-agents/current-implementation-state.md
docs/docs/ai-agents/current-plane-task.md
docs/docs/product/user-roles.md
docs/docs/security/permission-matrix.md
docs/docs/architecture/scoped-rbac-and-tenancy.md
docs/docs/frontend/overview.md
docs/docs/architecture/architecture-decisions-plane-backlog-v1.mdIf more context is needed, use targeted search by documentation heading, route, permission name, or issue key only.
Out of Scope / Non-goals
text
- Backend changes.
- Frontend behavior changes.
- EF migrations.
- RBAC model or permission seed changes.
- Live backend or database-dependent tests.
- IikoConnector or Syrve probe/connection changes.Implementation Handoff
text
Status: not started
Updated: 2026-07-06
Previous task completed: MHPAY-127 / MHPAY-FE-010.
- Added `frontend/tests/rbac-context-v2.spec.ts`.
- Added scoped dashboard mock support in `frontend/tests/helpers/mockApi.ts`.
- Updated `useDashboardSummary` query key to include active organization/location.
- Updated `codegraph/manifest.yaml` and `docs/docs/ai-agents/current-implementation-state.md`.
- Commit pushed to `main`: d07c91d0dbfb5eb1d9e9a71321292c5c05ba8289.
- Verification:
- `cd frontend && npx playwright test rbac-context-v2.spec.ts` passed 3/3.
- `cd frontend && npm run build` passed.
Recommended first verification for this task:
- `cd docs && npm run build`Plane Description (from issue)
Import key: MHPAY-DOC-003 · Depends on: все задачи epic RBAC-V2
Goal
Синхронизировать product/security/docs с RBAC v2 и admin list/detail UX.
Scope
user-roles.md— mega must select org/outlet для операций.permission-matrix.md— platform org registry, users pages.scoped-rbac-and-tenancy.md— v2 context rules.frontend/overview.md— routes platform/settings users.architecture-decisions-plane-backlog-v1.md— статусы новых задач.
Acceptance criteria
cd docs && npm run buildOK.- ADR-008 linked from index.
Out-of-band implementation handoff — 2026-07-28
The Plane issue metadata above remains unchanged and still describes MHPAY-128. Separately, the repository now contains the completed supplier-settlement foundation requested outside that Plane issue:
- canonical payment arithmetic and fail-closed
payment_not_fully_distributedguards; - partial invoice settlement with payment remainder separated from remaining invoice debt;
- pure deterministic FIFO proposal with manual override and persisted order;
- processing-state eligibility rechecked through candidate, allocation, queue and worker write;
WriteOutcomeUnknownrecovery through readback instead of blind retry;- reconciliation of expected per-document unpaid balances;
- non-runnable supplier-advance and 1:N posting-operation foundations;
- executable Reqnroll regression scenarios and the living decision document
docs/docs/architecture/supplier-settlement.md; - the follow-up IikoConnector trace prompt
docs/docs/ai-agents/iikoconnector-supplier-settlement-prompt.md.
No Plane state, assignee, dates or issue description were mutated, and no commit/push/PR was performed.