Skip to content

ACC · Roles and overrides

A member's roles and overrides change only through grant_role(), revoke_role(), set_override() and clear_override(), each under user:write at the pool, and only for permissions the caller holds there. This page holds those functions and the tabs of the Ubah akses Sheet that call them. Part of Access, code ACC.

R-ACC-14 · A person has at most one membership per organization

Section titled “R-ACC-14 · A person has at most one membership per organization”
  • Status: built
  • Example: given Rina is a member of organization A, when a second membership for them in A is saved, then it is refused.
  • Refusal: none: unique_violation (23505).
  • Who: every writer.
  • Source: [Ref] Data model V13: memberships.

R-ACC-16 · Reading other members' profiles, memberships, roles and overrides needs user:read

Section titled “R-ACC-16 · Reading other members' profiles, memberships, roles and overrides needs user:read”
  • Status: built
  • Example: given an admin, when they read member_roles, then no row comes back; a super_admin sees them.
  • Refusal: none: hidden.
  • Who: super_admin holds user:read. A leader without it reads the delegations of the permissions they hold through a role (R-ACC-242).
  • Source: [Ref] Roles, policy matrix.

R-ACC-17 · Adding or changing a membership or a profile needs user:write

Section titled “R-ACC-17 · Adding or changing a membership or a profile needs user:write”
  • Status: built
  • Example: given an admin, when they change Deka's profile's full_name, then nothing changes; a super_admin's change goes through.
  • Refusal: none: insufficient_privilege (42501) on insert; no effect on update.
  • Who: super_admin holds user:write. A member's role is given only through grant_role() (R-ACC-107, R-ACC-108), which needs user:write at the role's pool (R-ACC-110); an override only through set_override() (R-ACC-124, R-ACC-125), which needs user:write at the override's pool (R-ACC-19); and rental companies only through set_company_scope() (R-ACC-134), which needs user:write at every active pool (R-ACC-136) and holds a caller without the flag to their own set (R-ACC-149, R-ACC-152); the flag only through set_all_rental_companies() (R-ACC-173), which needs the same and the caller's own flag (R-ACC-150); and a membership's status only through suspend_member() and reinstate_member() (R-ACC-187, R-ACC-188), which need user:write at every active pool (R-ACC-190), as a direct write to memberships is refused (R-ACC-174). The one exception: a leader delegates a delegable permission they hold through a role, with no user:write (R-ACC-234), and its holder or a super_admin revokes it (R-ACC-239).
  • Source: [Ref] Roles, policy matrix. Roles left this rule in M1-02 (#455), when member_roles became writable only through the functions (D3); overrides and rental companies left it in M1-03 (#456) the same way; a membership's status left it in M1-04 (#457).
Section titled “R-ACC-18 · Deleting a membership, a profile or a member's rental-company link needs user:delete”
  • Status: retired (replaced by R-ACC-37, which drops profiles, and R-ACC-38, which says profiles are never deleted; since M1-03 a rental-company link is removed by set_company_scope(), R-ACC-134)
  • Example: given an admin, when they delete a membership, then nothing is deleted; a super_admin's delete goes through.
  • Refusal: none: no effect.
  • Who: super_admin holds user:delete.
  • Source: [Ref] Roles, policy matrix.

R-ACC-19 · set_override() and clear_override() are refused to a caller without user:write at the override's pool

Section titled “R-ACC-19 · set_override() and clear_override() are refused to a caller without user:write at the override's pool”
  • Status: built
  • Example: given an admin who holds no user:write, or a super_admin who holds it at SBY only, when either sets or clears Deka's deny of payment:read at PML, then it is refused and nothing changes; the same super_admin's call for SBY goes through. A pool id that names no pool is refused the same way.
  • Refusal: access.not_allowed (42501), with pool_id.
  • Who: every caller of the two functions (R-ACC-125, R-ACC-128). A member's role is removed only through revoke_role() (R-ACC-107, R-ACC-109), held to R-ACC-110 the same way. A caller who passes and lacks the flag is still held to R-ACC-166.
  • Source: [Ref] Roles, policy matrix (member roles and overrides: delete needs user:write). Roles left this rule in M1-02 (#455), as R-ACC-17's did. Restated in M1-03 (#456), when overrides became writable only through the functions: the check is at the override's pool, as R-ACC-110's is at the role's; it was "removing a member's override needs user:write" in the organization.

R-ACC-20 · Adding, changing or deleting an organization's own roles needs user:write

Section titled “R-ACC-20 · Adding, changing or deleting an organization's own roles needs user:write”
  • Status: built
  • Example: given a super_admin, when they add a role "Supervisor PML" for their organization, then it is saved; an admin's attempt is refused.
  • Refusal: none: insufficient_privilege (42501) on insert; no effect on update or delete.
  • Who: super_admin holds user:write.
  • Source: [Ref] Roles, policy matrix.

R-ACC-21 · An organization's copies of the system roles, and their permissions, can't be changed from the app

Section titled “R-ACC-21 · An organization's copies of the system roles, and their permissions, can't be changed from the app”
  • Status: built
  • Example: given organization A's copy of the system role satpam, when A's super_admin adds payment:read to it, then nothing changes; a role A made itself can be changed (R-ACC-20).
  • Refusal: none: no effect.
  • Who: every app user, super_admin included, in every organization. The copies are the roles marked is_system, one set per organization (R-TEN-03). Only a migration changes them.
  • Source: [Ref] Roles, policy matrix (system roles locked); [Ref] Data model V13, lookup tables; #149 (the CTO's answer 1); #164.

R-ACC-22 · A member holds the same role at the same pool at most once

Section titled “R-ACC-22 · A member holds the same role at the same pool at most once”
  • Status: built
  • Example: given Deka holds checker at PML, when checker at PML is granted again, then it is refused; checker at SBY is accepted.
  • Refusal: none: unique_violation (23505).
  • Who: every writer. A role always names a pool (R-ACC-04), so there is no "all pools" row.
  • Source: D9 (P4); #164 (no role or override without a pool since R-ACC-04).

R-ACC-23 · A member has at most one override of a permission at a pool, either a grant or a deny

Section titled “R-ACC-23 · A member has at most one override of a permission at a pool, either a grant or a deny”
  • Status: built
  • Example: given Rina has a deny for payment:read at PML, when a grant or a deny of payment:read at PML is saved for Rina as a second row, then it is refused; a grant of payment:read at SBY is accepted. Through set_override() the other effect replaces the deny instead (R-ACC-126), and the same effect is refused with a key (R-ACC-127).
  • Refusal: none: unique_violation (23505).
  • Who: every writer, the migration's access step included (R-ACC-71).
  • Source: [Ref] Data model V13: member_permission_overrides; zuki in the session on #456 (at most one override per member, permission and pool). It was "the same override (permission, effect, pool) at most once", which let a grant and a deny of one permission at one pool stand together.

R-ACC-50 · A member can grant a role, a grant override or a deny override at a pool only for permissions they hold at that pool

Section titled “R-ACC-50 · A member can grant a role, a grant override or a deny override at a pool only for permissions they hold at that pool”
  • Status: built
  • Example: given an admin who holds payment:read at PML but not payment:approve, when they grant Rina finance at PML, then it is refused, because finance includes payment:approve; denying Rina payment:read at PML goes through, and anything at SBY, where they hold nothing, is refused.
  • Refusal: access.grant_not_held, with pool_id and the permission_codes the granter lacks there.
  • Who: every member who can manage users (user:write). For overrides, set_override() checks it for a grant and a deny alike, a switch of effect included (R-ACC-125, R-ACC-126); clearing one is R-ACC-130.
  • Source: #144 (zuki's answer 7: a granter can grant only their own permissions).

R-ACC-51 · There is no permission request in the app; a member who needs more asks a granter directly

Section titled “R-ACC-51 · There is no permission request in the app; a member who needs more asks a granter directly”
  • Status: planned
  • Example: given a checker who needs payment:read, when they look for a way to ask for it in the app, then there is none; they ask a super_admin, who grants it (R-ACC-50).
  • Refusal: none.
  • Who: every member.
  • Source: #144 (zuki's answer 7).

R-ACC-107 · App users change a member's roles only through grant_role() and revoke_role(); a direct insert, update or delete on member_roles is refused

Section titled “R-ACC-107 · App users change a member's roles only through grant_role() and revoke_role(); a direct insert, update or delete on member_roles is refused”
  • Status: built
  • Example: given a super_admin at PML, when they insert a member_roles row for Deka as checker at PML, change one, or delete one directly, then it is refused and nothing changes; grant_role() and revoke_role() make the same changes (R-ACC-108, R-ACC-109).
  • Refusal: none: insufficient_privilege (42501), as authenticated holds no insert, update or delete on member_roles. Reading it is still R-ACC-16.
  • Who: every app user, super_admin included. The operator, the migration's access step (R-ACC-75), invitation acceptance (R-ACC-96) and the new-pool grant (R-ACC-47) write member_roles as before.
  • Source: D3 (a write that changes access is a business action in Postgres); the lead in the session on #455 (RPC only).

R-ACC-108 · grant_role() gives an active member of the caller's organization one role at one pool

Section titled “R-ACC-108 · grant_role() gives an active member of the caller's organization one role at one pool”
  • Status: built
  • Example: given Rina is super_admin at PML and Deka is an active member holding satpam at PML, when Rina calls grant_role() for Deka's membership, checker and PML, then Deka holds checker and satpam at PML, the row records Rina as granted_by, and Deka's sessions end (R-ACC-08).
  • Refusal: each has its own rule, checked in this order: access.member_not_found (R-ACC-116), access.not_allowed (R-ACC-110), access.role_not_at_pool (R-ACC-114), access.member_not_active (R-ACC-115), access.member_outside_scope (R-ACC-165), access.role_already_held (R-ACC-112), access.grant_not_held (R-ACC-50).
  • Who: holders of user:write at the role's pool (super_admin among the system roles). One role at one pool per call; a second role is a second call, and a second entry in the activity log (R-ACC-117).
  • Source: zuki in the session on #455 (grant_role() and revoke_role() only, each click one action); D3; R-ACC-04 (every role names a pool).

R-ACC-109 · revoke_role() removes one role a member holds at one pool

Section titled “R-ACC-109 · revoke_role() removes one role a member holds at one pool”
  • Status: built
  • Example: given Deka holds checker and satpam at PML, when a super_admin at PML calls revoke_role() for Deka's membership, checker and PML, then Deka holds satpam at PML only, and Deka's sessions end (R-ACC-08). A role held at another pool is untouched.
  • Refusal: each has its own rule, checked in this order: access.member_not_found (R-ACC-116), access.not_allowed (R-ACC-110), access.member_not_active (R-ACC-115), access.member_outside_scope (R-ACC-165), access.role_not_held (R-ACC-113), access.grant_not_held (R-ACC-111), then access.last_user_manager when the organization would be left with no active member holding user:write (R-ACC-40).
  • Who: holders of user:write at the role's pool. Revoking your own role is allowed and signs you out (R-ACC-08), unless R-ACC-40 refuses it. A role held at an inactive pool can still be revoked, as R-ACC-114 checks grants only; a pool of another organization gives access.role_not_held.
  • Source: zuki in the session on #455; D37 (a change to your own roles signs you out too); #72 (CTO-ACC-2, R-ACC-40).

R-ACC-110 · grant_role() and revoke_role() are refused to a caller without user:write at the role's pool

Section titled “R-ACC-110 · grant_role() and revoke_role() are refused to a caller without user:write at the role's pool”
  • Status: built
  • Example: given an admin who holds no user:write, or a super_admin who holds it at SBY only, when either calls grant_role() or revoke_role() for checker at PML, then it is refused and nothing changes; the same super_admin's call for SBY goes through.
  • Refusal: access.not_allowed (42501), with pool_id.
  • Who: every caller of the two functions. A caller who passes and lacks the flag is still held to R-ACC-165.
  • Source: the lead in the session on #455 (both functions need user:write at the role's pool); R-ACC-17, R-ACC-19; D10.

R-ACC-111 · revoke_role() is refused when the role holds a permission the caller lacks at that pool

Section titled “R-ACC-111 · revoke_role() is refused when the role holds a permission the caller lacks at that pool”
  • Status: built
  • Example: given Rina holds user:write at PML through an organization's own role that lacks payment:approve, when they revoke finance, which holds payment:approve, from Deka at PML, then it is refused and Deka keeps finance; revoking checker, whose permissions Rina all holds at PML, goes through.
  • Refusal: access.grant_not_held, with pool_id and the permission_codes the caller lacks there, as R-ACC-50.
  • Who: every caller of revoke_role(). A caller may take away only a role they could give at that pool; grant_role() is held to R-ACC-50 already. A caller without the flag is also held to R-ACC-165.
  • Source: zuki in the session on #455 (revoking needs the same as a grant); R-ACC-50 (#144, zuki's answer 7).

R-ACC-112 · grant_role() is refused when the member already holds that role at that pool

Section titled “R-ACC-112 · grant_role() is refused when the member already holds that role at that pool”
  • Status: built
  • Example: given Deka holds checker at PML, when a super_admin at PML grants Deka checker at PML again, then it is refused, nothing changes and no session ends; checker at SBY, by a super_admin at SBY, goes through.
  • Refusal: access.role_already_held, with membership_id, role_id and pool_id.
  • Who: every caller of grant_role(). R-ACC-22 still holds for every other writer of member_roles.
  • Source: D10 (every refusal raises a stable key); R-ACC-22.

R-ACC-113 · revoke_role() is refused when the member doesn't hold that role at that pool

Section titled “R-ACC-113 · revoke_role() is refused when the member doesn't hold that role at that pool”
  • Status: built
  • Example: given Deka holds checker at SBY only, when a super_admin at PML revokes checker at PML from Deka, then it is refused, nothing changes and no session ends.
  • Refusal: access.role_not_held, with membership_id, role_id and pool_id.
  • Who: every caller of revoke_role().
  • Source: D10.

R-ACC-114 · grant_role() is refused when the role or the pool is not of the member's organization, or the pool is inactive

Section titled “R-ACC-114 · grant_role() is refused when the role or the pool is not of the member's organization, or the pool is inactive”
  • Status: built
  • Example: given Rina is super_admin of organizations A and B, and Deka a member of A, when Rina grants Deka a role of B, or a role of A at a pool of B, or a role of A at A's closed pool SMG, then it is refused and nothing changes. A caller who holds no user:write at the pool is refused first, by R-ACC-110.
  • Refusal: access.role_not_at_pool, with role_id and pool_id.
  • Who: every caller of grant_role(). As R-ACC-90 holds for an invitation.
  • Source: D10; R-ACC-90; R-TEN-03 (each organization has its own roles).

R-ACC-115 · grant_role() and revoke_role() are refused when the member's membership is suspended

Section titled “R-ACC-115 · grant_role() and revoke_role() are refused when the member's membership is suspended”
  • Status: built
  • Example: given Deka's membership is suspended, when a super_admin grants Deka checker at PML or revokes their satpam there, then it is refused and Deka's roles stay as they were; once the membership is active again, the same calls go through.
  • Refusal: access.member_not_active, with membership_id.
  • Who: every caller of the two functions. A suspended member holds nothing while suspended (R-ACC-07); suspending and reinstating are R-ACC-187 and R-ACC-188.
  • Source: zuki in the session on #455 (a suspended member's roles are refused, with a stable key).

R-ACC-116 · grant_role() and revoke_role() are refused for a membership that doesn't exist or is in an organization where the caller holds no user:read

Section titled “R-ACC-116 · grant_role() and revoke_role() are refused for a membership that doesn't exist or is in an organization where the caller holds no user:read”
  • Status: built
  • Example: given Rina is super_admin of organization A only, when they call grant_role() with a membership of organization B, or an id that names no membership, then it is refused, nothing changes, and the refusal says nothing of B. Had Rina been super_admin of B too, the B membership would be found.
  • Refusal: access.member_not_found, with membership_id.
  • Who: every caller of the two functions. The test is the one that hides memberships and member roles from a reader (R-ACC-16).
  • Source: D10; R-ACC-102 (a refusal never shows another organization's rows).

R-ACC-117 · Each grant_role() or revoke_role() call is one entry in the activity log, showing who made it

Section titled “R-ACC-117 · Each grant_role() or revoke_role() call is one entry in the activity log, showing who made it”
  • Status: built
  • Example: given a super_admin grants Deka checker at PML, when the audit log is read, then the call wrote one audit row, the member_roles insert, with the super_admin as actor and PML as pool, under the call's transaction id (R-AUD-13), so the activity log lists it once (R-AUD-14); a revoke writes one row, the delete, the same way, and a refused call writes none.
  • Refusal: none.
  • Who: every call of the two functions. The profile's time of last access change (R-ACC-08) isn't audited. The activity log page itself is M7.
  • Source: D52 (one action is one entry); R-AUD-01, R-AUD-04, R-AUD-13; zuki in the session on #455 (each click one action).

R-ACC-118 · /users at a pool lists every member of the organization, each with the roles they hold at that pool only

Section titled “R-ACC-118 · /users at a pool lists every member of the organization, each with the roles they hold at that pool only”
  • Status: built
  • Example: given Deka holds checker and satpam at PML and finance at SBY, when a super_admin opens /users at PML, then Deka's row shows their name, their login email (R-ACC-122) and the role names Checker and Satpam; at SBY it shows Finance. Given Rina holds roles at PML only, at SBY Rina is listed with no role, so Ubah akses can give Rina a first role there (R-ACC-121). A suspended member is listed with a Ditangguhkan badge and no Ubah akses, as R-ACC-115 and R-ACC-142 refuse every change to them; their row menu offers Pulihkan and Keluarkan (R-ACC-198). For a caller without the flag, a member outside their set keeps Ubah akses, with Peran and Pengecualian izin read-only (R-ACC-167, R-ACC-168). The list changes nothing by itself.
  • Refusal: none: without user:read at the pool the rows are hidden (R-ACC-16), and the page is refused by R-APP-25.
  • Who: holders of user:read at the current pool, through pool_members(), which gives each role's name as invitable_roles() does. M1-04 adds the filters (R-ACC-195 to R-ACC-197), the row menu (R-ACC-198, R-ACC-199), the member detail page (R-ACC-201) and the invitations tab (R-ACC-204).
  • Source: zuki in the session on #455 (a minimal read-only list of members at the current pool; every member of the organization, so a first role at a new pool can be granted there); R-ACC-16.

R-ACC-119 · Ubah akses on a member's row is offered only to a holder of user:write at the current pool, and opens a Sheet with the tabs Peran, Pengecualian izin and Perusahaan rental

Section titled “R-ACC-119 · Ubah akses on a member's row is offered only to a holder of user:write at the current pool, and opens a Sheet with the tabs Peran, Pengecualian izin and Perusahaan rental”
  • Status: built
  • Example: given a super_admin at PML, when they open /users, then Deka's row offers Ubah akses, which opens a Sheet for Deka at PML: Peran holds Deka's roles at PML (R-ACC-120, R-ACC-121), Pengecualian izin Deka's overrides at PML (R-ACC-144) and Perusahaan rental Deka's rental companies (R-ACC-147). A member with user:read but no user:write at PML sees the list with no Ubah akses, and nobody sees it on a suspended member's row (R-ACC-115, R-ACC-142).
  • Refusal: none: the action isn't shown. A call made anyway is refused by R-ACC-110, R-ACC-19, R-ACC-136, R-ACC-165 or R-ACC-166. For a caller without the flag, the tabs of a member outside their set are read-only (R-ACC-153, R-ACC-167, R-ACC-168).
  • Who: holders of user:write at the current pool, on the rows of active members. Suspending, reinstating and removing are the row menu's, not the Sheet's (R-ACC-198). A refusal from any of the functions shows next to its control in the Sheet (R-APP-10), and the member's access stays as it was.
  • Source: zuki in the session on #455 ("Ubah peran" opens a Sheet for that pool's roles); zuki in the session on #456 (one Sheet, Ubah akses, with three tabs). It was Ubah peran, with roles only.

R-ACC-120 · The Sheet offers to remove only the roles the caller may revoke at that pool

Section titled “R-ACC-120 · The Sheet offers to remove only the roles the caller may revoke at that pool”
  • Status: built
  • Example: given Rina holds user:write at PML through a role that lacks payment:approve, and Deka holds checker and finance at PML, when Rina opens Deka's Sheet, then checker has a remove control and finance has none; removing checker calls revoke_role() (R-ACC-109).
  • Refusal: none: the control isn't shown for a role the read marks can_revoke false. The last user manager (R-ACC-40) isn't foreseen by can_revoke: its refusal shows next to the control (R-APP-10).
  • Who: holders of user:write at the current pool. can_revoke follows R-ACC-110, R-ACC-111 and R-ACC-165; for a member outside a scoped caller's set, the tab is read-only (R-ACC-167).
  • Source: the lead in the session on #455 (be exposes can_revoke per held role); R-ACC-111.

R-ACC-121 · The Sheet offers to add only the roles invitable_roles() gives the caller at that pool, less those the member holds there

Section titled “R-ACC-121 · The Sheet offers to add only the roles invitable_roles() gives the caller at that pool, less those the member holds there”
  • Status: built
  • Example: given Rina may give checker, satpam and viewer at PML (invitable_roles()), and Deka holds satpam at PML, when Rina opens Deka's Sheet, then it offers checker and viewer; choosing checker calls grant_role() (R-ACC-108).
  • Refusal: none: a role not offered can't be chosen. A call made anyway is refused by R-ACC-50, R-ACC-110, R-ACC-112 or R-ACC-165.
  • Who: holders of user:write at the current pool. For a member outside a scoped caller's set, nothing is offered (R-ACC-167).
  • Source: the lead in the session on #455 (the editor offers grants from invitable_roles()); R-ACC-50, R-ACC-91.

R-ACC-122 · The members list at a pool shows each member's login email beside their name, only to holders of user:read at that pool

Section titled “R-ACC-122 · The members list at a pool shows each member's login email beside their name, only to holders of user:read at that pool”
  • Status: built
  • Example: given Deka signs in as deka@example.test and holds checker at PML, when a super_admin at PML reads pool_members() for PML, then Deka's row has "Deka" and "deka@example.test", and /users shows both (R-ACC-118); a super_admin at SBY only, or a member without user:read at PML, gets no row for PML and no email.
  • Refusal: none: hidden.
  • Who: holders of user:read at the pool (super_admin among the system roles), through pool_members(). Other members still see only a colleague's name and avatar (R-ACC-39); the email comes from the login, which no app user reads directly.
  • Source: zuki in the session on #455 (the email beside the name); R-ACC-16, R-ACC-99 (user:read at the pool).

R-ACC-123 · When the member in the Sheet is the caller, the Sheet says before each change to their roles or overrides that it will sign them out

Section titled “R-ACC-123 · When the member in the Sheet is the caller, the Sheet says before each change to their roles or overrides that it will sign them out”
  • Status: built
  • Example: given Rina is super_admin at PML, when they open Ubah akses on their own row and choose to add finance, or to set a deny of report:read, then the Sheet says the change will sign them out and asks them to confirm; once confirmed, grant_role() or set_override() runs and their next request lands on /login (R-ACC-08, R-ACC-48). Saving their own rental companies gives no such warning, as it signs nobody out (R-ACC-140); on Deka's row the Sheet gives no warning either.
  • Refusal: none.
  • Who: holders of user:write at the current pool, on their own row, in the Peran and Pengecualian izin tabs. Changing your own roles and overrides is allowed (R-ACC-108, R-ACC-109, R-ACC-125, R-ACC-128); R-ACC-40 may still refuse it.
  • Source: D37 (a change to your own roles or overrides signs you out too); the lead in the session on #455 (the page side of D37); fe's review there; the lead in the session on #456 (overrides too, scope not). It covered roles only.

R-ACC-124 · App users change a member's overrides only through set_override() and clear_override(); a direct insert, update or delete on member_permission_overrides is refused

Section titled “R-ACC-124 · App users change a member's overrides only through set_override() and clear_override(); a direct insert, update or delete on member_permission_overrides is refused”
  • Status: built
  • Example: given a super_admin at PML, when they insert a member_permission_overrides row for Deka, change one, or delete one directly, then it is refused and nothing changes; set_override() and clear_override() make the same changes (R-ACC-125, R-ACC-128).
  • Refusal: none: insufficient_privilege (42501), as authenticated holds no insert, update or delete on member_permission_overrides. Reading it is still R-ACC-16.
  • Who: every app user, super_admin included. A delegation is made and removed through delegate_permission() and revoke_delegation() (R-ACC-234, R-ACC-239), never by a direct write. The operator and the migration's access step (R-ACC-71, R-ACC-81 to R-ACC-83) write the table as before.
  • Source: D3; the lead in the session on #456 (RPC only, as R-ACC-107 for roles).

R-ACC-125 · set_override() gives an active member of the caller's organization a grant or a deny of one permission at one pool

Section titled “R-ACC-125 · set_override() gives an active member of the caller's organization a grant or a deny of one permission at one pool”
  • Status: built
  • Example: given Rina is super_admin at PML and Deka holds satpam at PML, when Rina calls set_override() for Deka's membership, PML, vehicle:read and grant, with the reason "cek unit pagi" or with no reason, then Deka reads PML's cars (R-ACC-05), the override records Rina as granted_by and the reason if given, and Deka's sessions end (R-ACC-08).
  • Refusal: each has its own rule, checked in this order: access.member_not_found (R-ACC-141), access.not_allowed (R-ACC-19), access.permission_not_found (R-ACC-131), access.pool_not_available (R-ACC-132), access.member_not_active (R-ACC-142), access.member_outside_scope (R-ACC-166), access.override_already_set (R-ACC-127), access.grant_not_held (R-ACC-50), then access.last_user_manager (R-ACC-40).
  • Who: holders of user:write at the override's pool. One override per call; the reason is optional.
  • Source: the lead in the session on #456 (set_override(membership, pool, permission, effect, reason)); D3; R-ACC-04.

R-ACC-126 · set_override() for a permission the member has an override of at that pool with the other effect switches that override to the new effect, unless it is a live delegation

Section titled “R-ACC-126 · set_override() for a permission the member has an override of at that pool with the other effect switches that override to the new effect, unless it is a live delegation”
  • Status: built
  • Example: given Deka has a grant of vehicle:read at PML, when a super_admin at PML sets a deny of vehicle:read at PML for Deka, then Deka has one override of vehicle:read at PML, the deny (R-ACC-23), with the new reason and granted_by; it is one action in the activity log (R-ACC-133) and Deka's sessions end (R-ACC-08).
  • Refusal: none. A switch to grant is held to R-ACC-50 like any grant; a switch to deny of user:write may be refused by R-ACC-40. A live delegation isn't switched: it is refused (R-ACC-260); an ended one is replaced (R-ACC-261).
  • Who: every caller of set_override().
  • Source: zuki in the session on #456 (setting the other effect switches it in one action).

R-ACC-127 · set_override() is refused when the member already has that override, with the same effect, at that pool

Section titled “R-ACC-127 · set_override() is refused when the member already has that override, with the same effect, at that pool”
  • Status: built
  • Example: given Deka has a deny of payment:read at PML, when a super_admin at PML sets a deny of payment:read at PML for Deka again, then it is refused, nothing changes, its reason included, and no session ends. A live delegation of the permission there is refused with either effect (R-ACC-260); a delegation past its end counts as no override (R-ACC-261).
  • Refusal: access.override_already_set, with membership_id, permission_code and pool_id.
  • Who: every caller of set_override().
  • Source: zuki in the session on #456 (the same effect again is refused with a key); D10.

R-ACC-128 · clear_override() removes a member's override of one permission at one pool, whichever its effect

Section titled “R-ACC-128 · clear_override() removes a member's override of one permission at one pool, whichever its effect”
  • Status: built
  • Example: given Deka has a deny of payment:read at PML, when a super_admin at PML calls clear_override() for Deka's membership, PML and payment:read, then the override is gone, Deka holds payment:read at PML again if a role gives it, and Deka's sessions end (R-ACC-08). An override at SBY is untouched. A delegated override is removed the same way (R-ACC-262).
  • Refusal: each has its own rule, checked in this order: access.member_not_found (R-ACC-141), access.not_allowed (R-ACC-19), access.member_not_active (R-ACC-142), access.member_outside_scope (R-ACC-166), access.override_not_held (R-ACC-129), access.grant_not_held (R-ACC-130), then access.last_user_manager when clearing a grant of user:write would leave the organization with no active member holding it (R-ACC-40).
  • Who: holders of user:write at the override's pool. An override at an inactive pool can still be cleared (R-ACC-132).
  • Source: the lead in the session on #456 (clear_override(membership, pool, permission)); D3.

R-ACC-129 · clear_override() is refused when the member has no override of that permission at that pool

Section titled “R-ACC-129 · clear_override() is refused when the member has no override of that permission at that pool”
  • Status: built
  • Example: given Deka has a deny of payment:read at SBY only, when a super_admin at PML clears payment:read at PML for Deka, then it is refused, nothing changes and no session ends. A pool of another organization gives the same refusal.
  • Refusal: access.override_not_held, with membership_id, permission_code and pool_id.
  • Who: every caller of clear_override().
  • Source: D10; R-ACC-113.

R-ACC-260 · set_override() is refused when the member holds a live delegation of that permission at that pool, whichever effect is asked

Section titled “R-ACC-260 · set_override() is refused when the member holds a live delegation of that permission at that pool, whichever effect is asked”
  • Status: built
  • Example: given Deka holds gate_team:approve at PML by Rina's delegation that hasn't ended, when a super_admin at PML sets a grant, or a deny, of gate_team:approve at PML for Deka, then it is refused, the delegation stays as it was, its giver, reason and end included, and no session ends. To change it, the super_admin clears it first (R-ACC-262) or revokes it (R-ACC-239).
  • Refusal: access.override_already_set, with membership_id, permission_code and pool_id, as R-ACC-127.
  • Who: every caller of set_override().
  • Source: zuki and the lead in the session on #638, 2026-11-18 (a delegated grant switched to a deny raised a bare check_violation, R-ACC-230); D10; D97.

R-ACC-261 · set_override() replaces a delegation past its end with an override that isn't delegated and has no end

Section titled “R-ACC-261 · set_override() replaces a delegation past its end with an override that isn't delegated and has no end”
  • Status: built
  • Example: given Deka's delegation of gate_team:approve at PML ended yesterday, when a super_admin at PML sets a deny of gate_team:approve at PML for Deka with no reason, then Deka has one override of it at PML (R-ACC-23): the deny, not delegated, with no end, the super_admin as granted_by and no reason; it is one entry in the activity log (R-ACC-133) and Deka's sessions end (R-ACC-08). A grant replaces it the same way.
  • Refusal: none: the ended delegation counts as no override for R-ACC-127.
  • Who: every caller of set_override().
  • Source: zuki and the lead in the session on #638, 2026-11-18; R-ACC-233 (an ended delegation gives nothing); R-ACC-232.

R-ACC-262 · clear_override() removes a delegated override, live or past its end

Section titled “R-ACC-262 · clear_override() removes a delegated override, live or past its end”
  • Status: built
  • Example: given Deka holds gate_team:approve at PML by Rina's delegation, when a super_admin at PML calls clear_override() for Deka's membership, PML and gate_team:approve, then the delegation is gone and Deka's sessions end (R-ACC-08), as revoke_delegation() would do (R-ACC-239, R-ACC-240); a delegation past its end is cleared the same way.
  • Refusal: as R-ACC-128.
  • Who: holders of user:write at the override's pool (R-ACC-19). A leader without user:write uses revoke_delegation().
  • Source: zuki and the lead in the session on #638, 2026-11-18.

R-ACC-130 · clear_override() is refused when the caller lacks the override's permission at that pool

Section titled “R-ACC-130 · clear_override() is refused when the caller lacks the override's permission at that pool”
  • Status: built
  • Example: given Rina holds user:write at PML through an organization's own role that lacks payment:approve, when they clear Deka's deny or grant of payment:approve at PML, then it is refused and the override stays; clearing Deka's deny of vehicle:read, which Rina holds at PML, goes through.
  • Refusal: access.grant_not_held, with pool_id and the permission_codes the caller lacks there, as R-ACC-50.
  • Who: every caller of clear_override(). A caller may clear only an override they could set at that pool; set_override() is held to R-ACC-50 already. A caller without the flag is also held to R-ACC-166.
  • Source: the lead in the session on #456 (clear needs the same as set, as R-ACC-111 for revoke); R-ACC-50.

R-ACC-131 · set_override() is refused for a permission code that isn't in the catalogue

Section titled “R-ACC-131 · set_override() is refused for a permission code that isn't in the catalogue”
  • Status: built
  • Example: given a super_admin at PML, when they set a grant of vehicle:delete for Deka at PML, then it is refused and nothing changes, as v2 has no such code (D39).
  • Refusal: access.permission_not_found, with permission_code.
  • Who: every caller of set_override().
  • Source: D10 (a stable key, not the foreign key's 23503).

R-ACC-132 · set_override() is refused at a pool that is inactive or not of the member's organization; clear_override() is allowed at an inactive pool

Section titled “R-ACC-132 · set_override() is refused at a pool that is inactive or not of the member's organization; clear_override() is allowed at an inactive pool”
  • Status: built
  • Example: given Rina is super_admin of organizations A and B, and Deka a member of A, when Rina sets an override for Deka at a pool of B, or at A's closed pool SMG, then it is refused and nothing changes; clearing Deka's override at SMG goes through.
  • Refusal: access.pool_not_available, with pool_id. A caller with no user:write at the pool is refused first, by R-ACC-19; so is an id that names no pool, as no one holds user:write there.
  • Who: every caller of set_override(); clear_override() at an inactive pool, as R-ACC-109 lets a role there be revoked.
  • Source: the lead in the session on #456; R-ACC-114.

R-ACC-133 · Each set_override() or clear_override() call is one entry in the activity log, showing who made it

Section titled “R-ACC-133 · Each set_override() or clear_override() call is one entry in the activity log, showing who made it”
  • Status: built
  • Example: given a super_admin sets a grant of vehicle:read for Deka at PML, when the audit log is read, then the call wrote one audit row, the insert, with the super_admin as actor and PML as pool, under the call's transaction id (R-AUD-13), so the activity log lists it once (R-AUD-14); a switch of effect writes one row, the update, and a clear one row, the delete. A refused call writes none.
  • Refusal: none.
  • Who: every call of the two functions. The activity log page itself is M7.
  • Source: D52; R-ACC-117.

R-ACC-144 · The Pengecualian izin tab lists the member's overrides at the current pool, each with its permission, whether it grants or denies, and its reason

Section titled “R-ACC-144 · The Pengecualian izin tab lists the member's overrides at the current pool, each with its permission, whether it grants or denies, and its reason”
  • Status: built
  • Example: given Deka has a grant of vehicle:read with the reason "cek unit pagi" and a deny of payment:read with no reason at PML, and a deny at SBY, when a super_admin at PML opens the tab, then it shows the two PML overrides, the permission's label in the user's language (from apps/web's Indonesian and English labels keyed by permission code, D29; the code itself where a label is missing), Izinkan or Tolak, and the reason beside it where there is one; the SBY deny isn't shown.
  • Refusal: none: without user:read the rows are hidden (R-ACC-16).
  • Who: holders of user:write at the current pool, in the Sheet (R-ACC-119). For a member outside a scoped caller's set, the tab is read-only (R-ACC-168).
  • Source: zuki in the session on #456 (the tab); the lead there (reason optional, shown beside each override; labels from apps/web i18n per D29).

R-ACC-145 · The Pengecualian izin tab offers to set a grant or a deny only of the permissions the caller holds at the current pool

Section titled “R-ACC-145 · The Pengecualian izin tab offers to set a grant or a deny only of the permissions the caller holds at the current pool”
  • Status: built
  • Example: given Rina holds user:write at PML through a role that lacks payment:approve, when Rina opens Deka's tab and adds an override, then payment:approve isn't offered, and vehicle:read is, as grant or deny, with an optional reason; saving calls set_override() (R-ACC-125). For vehicle:read, where Deka already has a grant, only deny is offered, which switches the override (R-ACC-126); grant isn't offered again.
  • Refusal: none: a permission or effect not offered can't be chosen. A call made anyway is refused by R-ACC-19, R-ACC-50, R-ACC-127 or R-ACC-166.
  • Who: holders of user:write at the current pool. For a member outside a scoped caller's set, nothing is offered (R-ACC-168).
  • Source: R-ACC-50; the lead in the session on #456.

R-ACC-146 · The Pengecualian izin tab offers to clear only the overrides whose permission the caller holds at the current pool

Section titled “R-ACC-146 · The Pengecualian izin tab offers to clear only the overrides whose permission the caller holds at the current pool”
  • Status: built
  • Example: given Rina holds user:write at PML through a role that lacks payment:approve, and Deka has a deny of payment:approve and a grant of vehicle:read at PML, when Rina opens the tab, then the grant of vehicle:read has a remove control and the deny of payment:approve has none; removing calls clear_override() (R-ACC-128).
  • Refusal: none: the control isn't shown. The last user manager (R-ACC-40) shows its refusal next to the control (R-APP-10).
  • Who: holders of user:write at the current pool. The control follows R-ACC-19, R-ACC-130 and R-ACC-166, as R-ACC-120 for roles.
  • Source: R-ACC-130; R-ACC-120.

R-ACC-259 · The Pengecualian izin tab marks a delegated override with a Delegasi badge, its giver and its end, and offers to remove it but not to switch its effect

Section titled “R-ACC-259 · The Pengecualian izin tab marks a delegated override with a Delegasi badge, its giver and its end, and offers to remove it but not to switch its effect”
  • Status: built
  • Example: given Deka holds gate_team:approve at PML by Rina's delegation "cuti Pak Budi" with Berlaku sampai 1 Des, when a super_admin at PML opens Deka's tab, then the row shows the permission's label, Izinkan, a Delegasi badge, Rina and 1 Des 2026 (R-ACC-258) beside the reason, and a remove control that calls clear_override() (R-ACC-262). The badge reads Delegasi, with "Dari Rina · sampai 1 Des 2026", or "Dari Rina" when there is no end. The add form doesn't offer gate_team:approve at all while Deka's delegation is live, since set_override() refuses either effect (R-ACC-260). A delegation past its end shows Berakhir too, and the add form offers the permission with both effects (R-ACC-261).
  • Refusal: none: the control isn't offered.
  • Who: holders of user:write at the current pool, in the Sheet (R-ACC-119). R-ACC-145 and R-ACC-146 still apply.
  • Source: the lead in the session on #638, 2026-11-18; the labels are fe's, in the same session.