@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / fae344c
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 3, 20:45 UTC

Document member core context hardening

davoodmehraban89 committed Sep 30, 2026 at 07:00 UTC fae344c2e94d66240ed6b5b80415dafaeaf33dd0
1 file changed +7 -2
docs/SLICE_B_TENANT_RBAC_VERIFICATION.md
+7 -2
@@ -20,6 +20,7 @@ Existing accounts were migrated conservatively: every existing license received
20 - `20260930031942_office_shared_rbac_and_referrals`
21 - `20260930032615_slice_b_rbac_fk_indexes`
22 - `20260930032654_harden_legacy_office_storage_member_writes`
23 +- `20260930033010_allow_member_core_read_context`
24
25 Exact applied SQL is archived under `supabase/migrations/`.
26
@@ -29,7 +30,7 @@ Exact applied SQL is archived under `supabase/migrations/`.
30
31 `finora_sync_records` accepts an explicit `p_organization_id`; it refuses organizations outside the caller's memberships and refuses inactive-license writes. The client pulls only the selected organization.
32
32 -Organization owners have implicit full member authorization inside commercially entitled modules. Non-owner members receive explicit module permissions. A module manager with `configure` can assign permissions for that module but cannot turn on a commercially unlicensed module.
33 +Organization owners have implicit full member authorization inside commercially entitled modules. Non-owner members receive explicit module permissions. A module manager with `configure` can assign permissions for that module but cannot turn on a commercially unlicensed module. Active members receive read-only access to the selected organization's `core` context (for example company/settings context) so a non-owner workspace can initialize; core writes remain owner-only unless a future explicit core-administration model is introduced.
34
35 ## Office automation
36
@@ -44,6 +45,8 @@ Organization owners have implicit full member authorization inside commercially
45
46 `js/organization-rbac.js` loads organization memberships, selected organization, organization license and member permissions before app entry. Non-owner module navigation is derived from both commercial entitlement and member `read` capability. Organization-aware sync includes `p_organization_id`.
47
48 +`js/organization-shell.js` restores organization controls after the module rail is rebuilt. Multi-organization users get an explicit organization switcher; owners/module-configurers get the access-management entry point.
49 +
50 The organization access surface lets an organization owner add an already-registered Finora user by email and lets owners/module-configurers assign capability, scope and confidentiality. External invitation/email onboarding is intentionally not claimed yet.
51
52 `js/office-rbac.js` gates registry configuration, draft creation, registration and referral by capability and uses organization-aware attachment paths. Authorized office users see the shared records returned by server RLS; referral is exposed only to members with `refer`.
@@ -54,11 +57,13 @@ The organization access surface lets an organization owner add an already-regist
57 - organization-scope `read` exposed normal correspondence but not correspondence above confidentiality clearance;
58 - increasing clearance exposed the confidential record;
59 - read-only member updated **0 rows**;
60 +- active non-owner member could read organization `core` context and updated **0 core rows**;
61 - cancelled-license organization owner could read historical correspondence and updated **0 rows**;
62 - referral RPC succeeded for a member with `read+refer` in organization scope;
63 - non-configure member could not read organization audit;
64 - referral mutation hit the immutable trigger (`42501`);
61 -- organization-audit mutation hit the immutable trigger (`42501`).
65 +- organization-audit mutation hit the immutable trigger (`42501`);
66 +- non-owner member with office `create` could use the organization-aware Storage path but not the legacy UID-prefixed write path.
67
68 All test data was inside transactions and rolled back.
69