ACC · Delegated approvals
A holder of a delegable approval permission can lend it to a member for a while, as a delegated grant override that names who gave it, why and until when (D97). Part of Access, code ACC. These are not rules of the role editor (R-ACC-107 to R-ACC-123); what set_override() and clear_override() do to a delegated override is R-ACC-260 to R-ACC-262, and how the role editor shows one is R-ACC-259, on Roles and overrides. A leader makes and revokes delegations in the Delegasi section of their profile page (R-APP-32, R-ACC-254 to R-ACC-258), slice #638. A member who receives a delegation sees it, at every pool, in the Delegasi untuk Anda block of the same page (R-ACC-281 to R-ACC-283).
R-ACC-229 · The permission catalogue marks each permission delegable or not; gate_debt:approve, gate_service:approve, gate_checkpoint:approve and gate_team:approve are delegable
Section titled “R-ACC-229 · The permission catalogue marks each permission delegable or not; gate_debt:approve, gate_service:approve, gate_checkpoint:approve and gate_team:approve are delegable”- Status: built
- Example: given the seed has run, when the permission catalogue is read, then the four gate approvals are marked delegable and every other code, user:write and gate:read included, is not. preparation:approve is marked delegable when M5 seeds it (R-ACC-65, D94).
- Refusal: none: this describes the seed. Delegating a code that isn't delegable is R-ACC-235.
- Who: the seed. A module that needs another delegable code marks it in its own decision.
- Source: D97 (only a delegable permission is delegated; the catalogue marks it); D96; #595.
R-ACC-230 · An override marked delegated is always a grant
Section titled “R-ACC-230 · An override marked delegated is always a grant”- Status: built
- Example: given Deka holds checker at PML, when a member_permission_overrides row is saved as a delegated deny of gate_team:approve at PML, then it is refused and nothing changes; a delegated grant is accepted.
- Refusal: none: check_violation (23514).
- Who: every writer of member_permission_overrides, the delegation functions (R-ACC-234) and the operator included.
- Source: D97 (a delegation is a grant override marked delegated).
R-ACC-231 · A delegated override names who gave it and a reason
Section titled “R-ACC-231 · A delegated override names who gave it and a reason”- Status: built
- Example: given Deka holds checker at PML, when a delegated grant of gate_team:approve at PML is saved with no granted_by, or with an empty reason, then it is refused; with Rina as granted_by and the reason "cuti Pak Budi", it is accepted. An override that isn't delegated still takes an optional reason (R-ACC-125).
- Refusal: none: check_violation (23514).
- Who: every writer of member_permission_overrides.
- Source: D97 (a delegation has who gave it and a reason).
R-ACC-232 · Only a delegated override has an end
Section titled “R-ACC-232 · Only a delegated override has an end”- Status: built
- Example: given Deka has a grant of vehicle:read at PML that isn't delegated, when it is saved with ends_at 2026-12-01, then it is refused; a delegated grant of gate_team:approve with ends_at 2026-12-01, or with none, is accepted. Every override the access step loads from v1 is not delegated and has no end (D97).
- Refusal: none: check_violation (23514).
- Who: every writer of member_permission_overrides, the migration's access step included (R-ACC-71).
- Source: D97 (an optional end, such as a holiday's cover; v1's overrides load as not delegated, with no end).
R-ACC-233 · A delegated override past its end gives nothing
Section titled “R-ACC-233 · A delegated override past its end gives nothing”- Status: built
- Example: given Deka holds gate_team:approve at PML by a delegation that ends at 2026-12-01 00:00, when Deka approves a gate pass's team aspect at PML on 2026-12-01 00:01, then it is refused as if no delegation existed, and my_permissions() no longer lists it (R-ACC-28), with no change to the row and no session ended. The row stays until it is revoked (R-ACC-239), cleared (R-ACC-262) or replaced (R-ACC-234, R-ACC-261).
- Refusal: none: the permission is simply not held.
- Who: every reader of a member's permissions. One reader of live overrides, which leaves out an ended one, is used by every access helper: row-level security, my_permissions(), the count of user managers behind R-ACC-40, and the member-management checks (R-ACC-191). No helper reads member_permission_overrides on its own.
- Source: D97 (past its end it gives nothing, because permissions are read on every query, R-ACC-49).
R-ACC-234 · delegate_permission() gives a member holding a role at a pool a delegated grant of a delegable permission the caller holds there through a role
Section titled “R-ACC-234 · delegate_permission() gives a member holding a role at a pool a delegated grant of a delegable permission the caller holds there through a role”- Status: built
- Example: given Rina holds admin_fleet at PML, which gives gate_team:approve, and holds no user:write, and Deka holds checker at PML, when Rina calls delegate_permission() for Deka's membership, PML, gate_team:approve, the reason "cuti Pak Budi" and the last day 2026-12-01 ("Berlaku sampai 1 Des"), then Deka holds gate_team:approve at PML (R-ACC-05) until its end, 2026-12-02 00:00 in PML's time zone (R-ACC-258), the override is marked delegated with Rina as granted_by, and Deka's sessions end (R-ACC-240). With no last day given (null), it lasts until it is revoked. A delegation of Deka's that has passed its end is replaced by the new one. Budi, who holds gate_team:approve at PML through admin_fleet, can be given it too: the delegation then adds nothing while Budi keeps the role, and is allowed.
- Refusal: each has its own rule, checked in this order: profile.not_signed_in (42501) when no one is signed in, access.member_not_found when the membership doesn't exist or is in an organization where the caller holds no active membership (not as R-ACC-141, which asks user:read, as a leader has none), access.cannot_delegate_self (R-ACC-247), access.permission_not_found (as R-ACC-131), access.not_delegable (R-ACC-235), access.pool_not_available (as R-ACC-132), access.not_held_by_role (R-ACC-236), access.member_not_active (as R-ACC-142), access.member_outside_scope (R-ACC-264), access.member_no_role_at_pool (R-ACC-237), access.reason_required (R-ACC-263), access.ends_at_past (R-ACC-248), then access.override_already_set (R-ACC-238).
- Who: a member holding a delegable permission at a pool through a role, with no user:write: the exception to R-ACC-17 and R-ACC-19. A permission held only by a grant override, delegated or not, is never delegated again, so a delegation is one step from a role. A super_admin delegates the same way, as the holder of every code through their role. A caller limited to rental companies (R-ACC-134) delegates only to a member within their set (R-ACC-264), as for every other change to a member; the member's own rental companies don't limit what the delegation gives them (D99).
- Source: D97 (who delegates; a delegation is a grant override marked delegated, with who gave it, a reason and an optional end); #595. The function's name and arguments, and access.ends_at_past, are DOC's proposal in the session on #584, as set_override() is for overrides (R-ACC-125). zuki and the lead in the session on #638, 2026-11-18: the refusal order, delegating to a member who holds the code through a role, and that the member's rental companies don't limit the delegation; zuki at the close of that session, 2026-11-18: a caller limited to rental companies is held to their set, as in set_override() (R-ACC-166).
R-ACC-235 · delegate_permission() is refused for a permission that isn't delegable
Section titled “R-ACC-235 · delegate_permission() is refused for a permission that isn't delegable”- Status: built
- Example: given Rina holds admin_fleet at PML, which gives vehicle:write, when they delegate vehicle:write at PML to Deka, then it is refused and nothing changes; gate_service:approve goes through (R-ACC-229).
- Refusal: access.not_delegable, with permission_code.
- Who: every caller of delegate_permission(), super_admin included.
- Source: D97 (each refusal has its key; only a delegable permission is delegated); D10.
R-ACC-236 · delegate_permission() is refused when the caller doesn't hold the permission at that pool through a role
Section titled “R-ACC-236 · delegate_permission() is refused when the caller doesn't hold the permission at that pool through a role”- Status: built
- Example: given Deka holds gate_team:approve at PML only by Rina's delegation, when Deka delegates it at PML to Sari, then it is refused; Rina, who holds it through admin_fleet at PML, can delegate it to Sari, but not at SBY, where Rina holds no role that gives it. A caller whose role gives it but who has a deny of it at that pool (R-ACC-06) doesn't hold it, and is refused the same way.
- Refusal: access.not_held_by_role (42501), with permission_code and pool_id.
- Who: every caller of delegate_permission().
- Source: D97 (a permission held only by delegation is never passed on); D10.
R-ACC-237 · delegate_permission() is refused when the member holds no role at that pool
Section titled “R-ACC-237 · delegate_permission() is refused when the member holds no role at that pool”- Status: built
- Example: given Sari holds checker at SBY only, when Rina, admin_fleet at PML, delegates gate_team:approve at PML to Sari, then it is refused and nothing changes; once Sari is granted a role at PML, the same call goes through. A grant override at PML doesn't count as a role there.
- Refusal: access.member_no_role_at_pool (P0001), with membership_id and pool_id.
- Who: every caller of delegate_permission().
- Source: D97 (to a member holding a role at that pool); D10.
R-ACC-238 · delegate_permission() is refused when the member already has an override of that permission at that pool, unless it is a delegation past its end
Section titled “R-ACC-238 · delegate_permission() is refused when the member already has an override of that permission at that pool, unless it is a delegation past its end”- Status: built
- Example: given Deka has a live delegation of gate_team:approve at PML, or a grant or a deny of it at PML that isn't delegated, when Rina delegates gate_team:approve at PML to Deka, then it is refused, nothing changes and no session ends; a delegation of Deka's at PML that has passed its end is replaced (R-ACC-234). A member holds at most one override of a permission at a pool (R-ACC-23).
- Refusal: access.override_already_set, with membership_id, permission_code and pool_id, as R-ACC-127.
- Who: every caller of delegate_permission().
- Source: D97; R-ACC-23; R-ACC-127. Replacing an ended delegation is DOC's proposal in the session on #584, so a holiday's cover can be given again without a revoke first.
R-ACC-239 · revoke_delegation() removes a member's delegated override of a permission at a pool, called by a holder of that permission there through a role or by a super_admin
Section titled “R-ACC-239 · revoke_delegation() removes a member's delegated override of a permission at a pool, called by a holder of that permission there through a role or by a super_admin”- Status: built
- Example: given Rina delegated gate_team:approve at PML to Deka, when Budi, who also holds admin_fleet at PML, calls revoke_delegation() for Deka's membership, PML and gate_team:approve, then the override is gone and Deka's sessions end (R-ACC-240); a super_admin at PML may revoke it too, and a delegation past its end may be revoked the same way. Deka, who holds it only by the delegation, or a checker at PML, is refused.
- Refusal: checked in this order: profile.not_signed_in (42501) when no one is signed in; access.member_not_found when the membership doesn't exist or is in an organization where the caller holds no active membership (as R-ACC-234, not R-ACC-141, which asks user:read, as a leader has none); access.not_allowed (42501), with pool_id and permission_code, when the caller is neither, a caller whose role gives the permission but who has a deny of it at that pool (R-ACC-06) counting as not holding it, as R-ACC-236; access.member_outside_scope (R-ACC-264) when the caller is limited to rental companies and the member is outside their set; then access.override_not_held (as R-ACC-129) when the member has no delegated override of it there, so an override that isn't delegated is left to clear_override() (R-ACC-128).
- Who: the holder of the permission at that pool through a role, whoever delegated it, with no user:write; a holder of user:write at that pool (super_admin), any delegation there. A delegation whose giver has since lost the role or been suspended is revoked the same way (R-ACC-249).
- Source: D97 (who revokes); #595. The function's name is DOC's proposal in the session on #584.
R-ACC-240 · delegate_permission() and revoke_delegation() end the member's sessions; a delegation reaching its end ends none
Section titled “R-ACC-240 · delegate_permission() and revoke_delegation() end the member's sessions; a delegation reaching its end ends none”- Status: built
- Example: given Deka is signed in, when Rina delegates gate_team:approve at PML to Deka, or revokes it, then Deka's sessions end and their profile records when (R-ACC-08, R-ACC-48); when the delegation reaches its end, no session ends and the permission is gone at Deka's next query (R-ACC-233, R-ACC-49). The caller's own sessions don't end.
- Refusal: none.
- Who: every member a delegation is given to or taken from.
- Source: D97 (an access change like any other ends the member's sessions); R-ACC-08.
R-ACC-241 · Each delegate_permission() or revoke_delegation() call is one entry in the activity log, showing who made it
Section titled “R-ACC-241 · Each delegate_permission() or revoke_delegation() call is one entry in the activity log, showing who made it”- Status: built
- Example: given Rina delegates gate_team:approve at PML to Deka, when the audit log is read, then the call wrote one audit row, the insert, with Rina 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); replacing an ended delegation writes one row, the update, and a revoke one row, the delete. A refused call writes none.
- Refusal: none.
- Who: every call of the two functions.
- Source: D97 (it is audited); D52; R-ACC-133.
R-ACC-242 · A holder of user:read lists every delegation at their pools; a leader without it lists the delegations of the permissions they hold through a role, at the pools where they hold them
Section titled “R-ACC-242 · A holder of user:read lists every delegation at their pools; a leader without it lists the delegations of the permissions they hold through a role, at the pools where they hold them”- Status: built
- Example: given Rina holds admin_fleet at PML and no user:read, when Rina reads the delegated overrides, then the delegations of gate_service:approve, gate_checkpoint:approve and gate_team:approve at PML come back, Budi's included, with their member, granted_by, reason and end, and no override that isn't delegated and none at SBY; a super_admin reads every delegation in the organization (R-ACC-16). A leader whose role gives a permission but who has a deny of it at that pool (R-ACC-06) doesn't hold it, as R-ACC-236, and doesn't list its delegations there.
- Refusal: none: hidden.
- Who: super_admin, through user:read; a leader, through the delegable permissions their roles give. They read them through pool_delegations() (R-ACC-251), with names, as R-ACC-16 hides the members' profiles from a leader; the page is the Delegasi section of /profile (R-ACC-255).
- Source: D97 (a super_admin lists every delegation; a leader, those of their own permissions at their pools).
R-ACC-247 · delegate_permission() is refused on the caller's own membership
Section titled “R-ACC-247 · delegate_permission() is refused on the caller's own membership”- Status: built
- Example: given Rina holds admin_fleet at PML, when Rina delegates gate_team:approve at PML to their own membership, then it is refused, nothing changes and no session ends; the same call for Deka goes through (R-ACC-234).
- Refusal: access.cannot_delegate_self (P0001), with membership_id. Not R-ACC-193's access.cannot_change_self, whose text is about suspending, reinstating or removing yourself.
- Who: every caller of delegate_permission(), super_admin included.
- Source: zuki and the lead in the session on #638, 2026-11-18; D10.
R-ACC-248 · delegate_permission() is refused when the last day it is given is before today in the pool's time zone
Section titled “R-ACC-248 · delegate_permission() is refused when the last day it is given is before today in the pool's time zone”- Status: built
- Example: given it is 2026-11-18 10:00 at PML, when Rina delegates gate_team:approve at PML to Deka with the last day 2026-11-17, then it is refused and nothing changes; with 2026-11-18 ("Berlaku sampai 18 Nov", an end of 2026-11-19 00:00, R-ACC-258), or with no last day, it goes through. Today is read in PML's time zone, not the caller's or UTC (R-CONV-10).
- Refusal: access.ends_at_past (P0001), with last_day, the date passed in, and ends_at, the end it works out to.
- Who: every caller of delegate_permission().
- Source: DOC's proposal in the session on #584; zuki and the lead in the session on #638, 2026-11-18 (the function takes the last day as a date; one before today at the pool is refused); D10.
R-ACC-249 · A delegation stays when its giver loses the role that gave them the permission, or is suspended
Section titled “R-ACC-249 · A delegation stays when its giver loses the role that gave them the permission, or is suspended”- Status: built
- Example: given Rina, admin_fleet at PML, delegated gate_team:approve at PML to Deka, when a super_admin revokes Rina's admin_fleet at PML (R-ACC-109), or suspends Rina (R-ACC-187), then Deka still holds gate_team:approve at PML until its end, no session of Deka's ends, and the delegation still names Rina as its giver; Budi, who holds admin_fleet at PML, or a super_admin can revoke it (R-ACC-239). Removing Rina's membership (R-ACC-189) leaves it too, since granted_by names Rina's profile, which stays.
- Refusal: none.
- Who: every delegation whose giver's roles or membership change.
- Source: zuki in the session on #638, 2026-11-18 (a delegation doesn't lapse with its giver); D97 (who revokes).
R-ACC-250 · A delegation survives its member's suspension, gives nothing while they are suspended and gives again when they are reinstated
Section titled “R-ACC-250 · A delegation survives its member's suspension, gives nothing while they are suspended and gives again when they are reinstated”- Status: built
- Example: given Deka holds gate_team:approve at PML by Rina's delegation with no end, when a super_admin suspends Deka (R-ACC-187), then Deka holds nothing (R-ACC-07) and the delegation stays; when Deka is reinstated (R-ACC-188), Deka holds gate_team:approve at PML again. Removing Deka's membership deletes the delegation with their other overrides (R-ACC-189).
- Refusal: none.
- Who: every member holding a delegation.
- Source: zuki and the lead in the session on #638, 2026-11-18; R-ACC-187 (a suspended member keeps their overrides); D48.
R-ACC-251 · pool_delegations() returns the delegations at a pool the caller may list, with the member's and the giver's names, the permission, the reason, the end, whether it is live and whether the caller may revoke it
Section titled “R-ACC-251 · pool_delegations() returns the delegations at a pool the caller may list, with the member's and the giver's names, the permission, the reason, the end, whether it is live and whether the caller may revoke it”- Status: built
- Example: given Rina holds admin_fleet at PML and no user:read, and Deka holds gate_team:approve at PML by Budi's delegation that ended yesterday, when Rina calls pool_delegations() for PML, then one row comes back with Deka's membership, Deka's and Budi's names (each the full name, or the email when the profile has none, as R-APP-17), gate_team:approve, the reason, its ends_at, is_live false and can_revoke true; a checker at PML gets no rows. Neither name is readable to Rina otherwise (R-ACC-16).
- Refusal: none: rows R-ACC-242 hides aren't returned.
- Who: the callers of R-ACC-242. can_revoke follows R-ACC-239, so it is false for a member outside a scoped caller's set (R-ACC-264); the row still comes back. A permission the caller's role gives but a deny at that pool takes away isn't held (R-ACC-236): its delegations aren't returned unless the caller holds user:read there, and then can_revoke is false unless the caller holds user:write there.
- Source: the lead in the session on #638, 2026-11-18 (reads are functions, not wider row-level security, D3); D97.
R-ACC-252 · delegable_permissions() returns the delegable permissions the caller holds at a pool through a role
Section titled “R-ACC-252 · delegable_permissions() returns the delegable permissions the caller holds at a pool through a role”- Status: built
- Example: given Rina holds admin_fleet at PML, which gives gate_service:approve, gate_checkpoint:approve and gate_team:approve, and a deny of gate_service:approve at PML, when Rina calls delegable_permissions() for PML, then gate_checkpoint:approve and gate_team:approve come back; for SBY, where Rina holds no role, nothing; Deka, who holds gate_team:approve at PML only by delegation, gets nothing.
- Refusal: none.
- Who: every signed-in member. It lists what R-ACC-235 and R-ACC-236 would let the caller delegate.
- Source: the lead in the session on #638, 2026-11-18; D97.
R-ACC-253 · delegation_candidates() returns the active members holding a role at a pool, other than the caller and within a scoped caller's set, to a caller who can delegate there
Section titled “R-ACC-253 · delegation_candidates() returns the active members holding a role at a pool, other than the caller and within a scoped caller's set, to a caller who can delegate there”- Status: built
- Example: given Rina holds admin_fleet at PML, Deka holds checker at PML, Sari holds checker at SBY only and Wawan holds satpam at PML but is suspended, when Rina calls delegation_candidates() for PML, then Deka comes back with their membership and name (as R-ACC-251), and Budi, who holds admin_fleet at PML, but not Rina, Sari or Wawan; a checker at PML, for whom delegable_permissions() returns nothing (R-ACC-252), gets no rows. Given Rina is limited to partner A, Deka to A and Budi has the flag, Rina gets Deka but not Budi, who is outside Rina's set (R-ACC-264); a member with an empty list comes back.
- Refusal: none: hidden.
- Who: a caller with at least one row from delegable_permissions() at that pool. It leaves out every member delegate_permission() would refuse as access.member_outside_scope (R-ACC-264).
- Source: the lead in the session on #638, 2026-11-18 (R-ACC-16 hides members from a leader without user:read); D97; R-ACC-237, R-ACC-247; zuki at the close of that session (the caller's rental-company limit, R-ACC-264).
R-ACC-254 · /profile shows a Delegasi section to a member who holds a delegable permission at the current pool through a role, or user:read there
Section titled “R-ACC-254 · /profile shows a Delegasi section to a member who holds a delegable permission at the current pool through a role, or user:read there”- Status: built
- Example: given the E2E admin_fleet login at PML, when it opens /profile, then the page shows the Delegasi section; the E2E super_admin sees it too; the E2E checker, who holds neither, sees no Delegasi section, and Deka, who holds gate_team:approve at PML only by a delegation, doesn't either.
- Refusal: none: the section isn't shown.
- Who: every signed-in member on /profile (R-APP-32).
- Source: zuki in the session on #638, 2026-11-18 (a leader's delegations live on their own profile page, not /users); D97 (a leader's page of their delegations).
R-ACC-255 · The Delegasi section lists the delegations at the current pool from pool_delegations(), with Anggota, Izin, Oleh, Alasan, Sampai and Status
Section titled “R-ACC-255 · The Delegasi section lists the delegations at the current pool from pool_delegations(), with Anggota, Izin, Oleh, Alasan, Sampai and Status”- Status: built
- Example: given Deka holds gate_team:approve at PML by Rina's delegation "cuti Pak Budi" ending 2026-12-02 00:00, and Tono held gate_service:approve by one that has ended, when Rina opens /profile at PML, then the section lists both: Deka, the label of gate_team:approve in the user's language (D29), Rina, "cuti Pak Budi", 1 Des 2026 (R-ACC-258) and Aktif; Tono's row shows Berakhir. Status is the delegation's own state: Aktif while it hasn't passed its end, so a suspended member's delegation still reads Aktif (R-ACC-250). A delegation with no end shows "—" under Sampai. With no delegations, the section says "Belum ada delegasi di pool ini." Under the title Delegasi, the subtitle reads "Izin persetujuan yang didelegasikan di pool {pool}."
- Refusal: none.
- Who: the members R-ACC-254 shows the section to; the rows follow R-ACC-242.
- Source: zuki and the lead in the session on #638, 2026-11-18 (the columns and Aktif / Berakhir); the labels are
fe's, in the session on #638, 2026-11-18.
R-ACC-256 · Cabut on a row of the Delegasi section asks for confirmation, saying the member will be signed out, then calls revoke_delegation()
Section titled “R-ACC-256 · Cabut on a row of the Delegasi section asks for confirmation, saying the member will be signed out, then calls revoke_delegation()”- Status: built
- Example: given Rina at PML sees Deka's delegation, live or ended, when Rina presses Cabut, then a dialog titled "Cabut delegasi {permission} dari Deka?" says "Deka akan dikeluarkan dan perlu masuk lagi.", with Batal and Cabut delegasi; on confirming, revoke_delegation() is called (R-ACC-239), the row leaves the list and Deka's sessions end (R-ACC-240). Cancelling changes nothing. A row whose can_revoke is false (R-ACC-251) has no Cabut.
- Refusal: none: a call made anyway is refused by R-ACC-239, and its refusal shows next to the control (R-APP-10).
- Who: the members R-ACC-239 lets revoke.
- Source: zuki and the lead in the session on #638, 2026-11-18.
R-ACC-257 · The Delegasi section's Delegasikan form offers members from delegation_candidates() and permissions from delegable_permissions(), and saves through delegate_permission()
Section titled “R-ACC-257 · The Delegasi section's Delegasikan form offers members from delegation_candidates() and permissions from delegable_permissions(), and saves through delegate_permission()”- Status: built
- Example: given Rina holds admin_fleet at PML, when Rina opens Delegasikan at PML, then Anggota offers the members delegation_candidates() returns (R-ACC-253), Izin the permissions delegable_permissions() returns (R-ACC-252), by label, Alasan is required and "Berlaku sampai (opsional)" is an optional date, with the hint "Hari terakhir delegasi berlaku. Kosongkan bila berlaku sampai dicabut."; choosing Deka, gate_team:approve, "cuti Pak Budi" and 1 Des calls delegate_permission() and the row shows Aktif. Delegasikan to Tono and gate_service:approve, whose delegation has ended, replaces it (R-ACC-234). A holder of user:read with no delegable permission at the pool through a role sees the list and no form.
- Refusal: none on the page: each refusal of delegate_permission() shows next to the form (R-APP-10), access.reason_required (R-ACC-263) next to Alasan as "Tulis alasan delegasi."
- Who: members for whom delegable_permissions() at the current pool returns a row.
- Source: zuki and the lead in the session on #638, 2026-11-18.
R-ACC-258 · Berlaku sampai names the last day of cover: delegate_permission() takes it as a date and stores an end of 00:00 the next day in the pool's time zone, shown as that date
Section titled “R-ACC-258 · Berlaku sampai names the last day of cover: delegate_permission() takes it as a date and stores an end of 00:00 the next day in the pool's time zone, shown as that date”- Status: built
- Example: given PML's time zone is Asia/Makassar, when Rina delegates with Berlaku sampai 1 Des 2026, then the delegation's ends_at is 2026-12-02 00:00 in Asia/Makassar, so Deka holds the permission all of 1 Des and not on 2 Des (R-ACC-233), and Sampai shows 1 Des 2026 (R-ACC-255). A date before today at the pool can't be chosen; today is allowed.
- Refusal: none: a past date is refused as access.ends_at_past (R-ACC-248).
- Who: every delegation given with an end. delegate_permission() takes the last day as a date, null for no end, and Postgres works out ends_at from the pool's time zone; apps/web sends the date as chosen.
- Source: zuki in the session on #638, 2026-11-18; the lead in the session on #638, 2026-11-18 (the function takes the date); R-CONV-10 (business dates in the pool's time zone).
R-ACC-263 · delegate_permission() is refused when the reason is missing or blank
Section titled “R-ACC-263 · delegate_permission() is refused when the reason is missing or blank”- Status: built
- Example: given Rina holds admin_fleet at PML and Deka holds checker at PML, when Rina delegates gate_team:approve at PML to Deka with no reason, or with " ", then it is refused before any row is written, nothing changes and no session ends; with "cuti Pak Budi" it goes through (R-ACC-234). R-ACC-231's check on the row stays as the guard for every other writer.
- Refusal: access.reason_required (P0001), with membership_id. R-ACC-231's check on the row stays as a backstop.
- Who: every caller of delegate_permission().
- Source: the lead in the session on #638, 2026-11-18 (a refusal raises a key, not R-ACC-231's bare check_violation); D10; D97 (a delegation has a reason).
R-ACC-264 · delegate_permission() and revoke_delegation() are refused when the caller lacks the flag and the member has the flag or a rental company outside the caller's own
Section titled “R-ACC-264 · delegate_permission() and revoke_delegation() are refused when the caller lacks the flag and the member has the flag or a rental company outside the caller's own”- Status: built
- Example: given Rina holds admin_fleet at PML and is limited to partner A, when Rina delegates gate_team:approve at PML to Deka, who is limited to A, or to Eko, whose list is empty, then it goes through. When Rina delegates it to Ika, who is linked to A and C, or to Budi, who has the flag, then it is refused, nothing changes and no session ends; revoking Ika's or Budi's delegation at PML is refused the same way, and a super_admin with the flag may do either. What the delegation gives Deka is not limited by Deka's rental companies: Deka's car scope stays as D99 sets it.
- Refusal: access.member_outside_scope (42501), with membership_id and the member's rental_company_ids outside the caller's set, as R-ACC-165. In delegate_permission() it is checked after access.member_not_active and before access.member_no_role_at_pool (R-ACC-234); in revoke_delegation() after access.not_allowed and before access.override_not_held (R-ACC-239), as clear_override() checks it before access.override_not_held (R-ACC-166).
- Who: every caller of the two functions without the flag in the member's organization (R-ACC-154), a leader with no user:write included. A member with the flag counts as outside, and one with an empty list is within every set, as R-ACC-165.
- Source: zuki at the close of the session on #638, 2026-11-18 (the delegation functions hold a scoped caller to their set, as every other function that changes a member does, R-ACC-165, R-ACC-166, R-ACC-192); D99; D100.
R-ACC-281 · my_delegations() returns the caller's own delegated overrides at every pool, live or ended
Section titled “R-ACC-281 · my_delegations() returns the caller's own delegated overrides at every pool, live or ended”- Status: built
- Example: given Rina delegated gate_team:approve at PML to Deka with the reason "cuti Pak Budi" until 2026-12-02 00:00, and Tono's delegation of gate_service:approve at SBY to Deka has ended, when Deka calls my_delegations(), then it returns two rows, each with the permission, the pool, the giver's name (as R-APP-17), the reason, ends_at and is_live: true for PML's, false for SBY's. No other member's delegation is returned, and a plain override (R-ACC-107 to R-ACC-123) is never returned.
- Refusal: none: a caller who holds no delegation, or no one signed in, gets no rows.
- Who: every signed-in member, for their own delegations only, whatever their permissions; anon can't call it. It takes no arguments. An ended delegation is returned until it is revoked, cleared or replaced (R-ACC-233).
- Source: zuki, 2026-11-19, in the session on #693 (#684: the receiver sees their delegations across all their pools; the read is be's public.my_delegations()); D97.
R-ACC-282 · /profile shows the Delegasi untuk Anda block only to a member who holds at least one delegation, live or ended
Section titled “R-ACC-282 · /profile shows the Delegasi untuk Anda block only to a member who holds at least one delegation, live or ended”- Status: built
- Example: given Deka holds gate_team:approve at PML by Rina's delegation, when Deka opens /profile at any pool, then the page shows a block titled Delegasi untuk Anda, below the Delegasi section (R-ACC-254) when that shows; the E2E viewer, who holds no delegation, sees no such block, while the E2E checker, whose only delegation has ended, sees it with one Berakhir row (R-ACC-283). Once Deka's only delegation is revoked (R-ACC-239), the block is gone.
- Refusal: none.
- Who: every signed-in member on /profile (R-APP-32); the rows come from my_delegations() (R-ACC-281), whatever the current pool. The English title is fe's.
- Source: zuki, 2026-11-19, in the session on #693 (#684: a block on /profile shown only when they hold one); the lead there (the title Delegasi untuk Anda).
R-ACC-283 · The Delegasi untuk Anda block lists Izin, Pool, Oleh, Alasan, Sampai and Status, and an ended delegation reads Berakhir until it is revoked, cleared or replaced
Section titled “R-ACC-283 · The Delegasi untuk Anda block lists Izin, Pool, Oleh, Alasan, Sampai and Status, and an ended delegation reads Berakhir until it is revoked, cleared or replaced”- Status: built
- Example: given Deka's two delegations of R-ACC-281, when Deka opens /profile, then the block lists gate_team:approve's label in the user's language (D29), PML, Rina, "cuti Pak Budi", 1 Des 2026 (R-ACC-258) and Aktif; and gate_service:approve's label, SBY, Tono, its reason, its date and Berakhir. A delegation with no end shows "—" under Sampai. Status is the delegation's own state, as R-ACC-255.
- Refusal: none.
- Who: the members R-ACC-282 shows the block to.
- Source: zuki, 2026-11-19, in the session on #693 (#684: the columns, Aktif / Berakhir as R-ACC-255, ended rows stay until revoked, cleared or replaced, R-ACC-233).