← Back to Mobile app developers
See how it helps
Temporary delegated access
Provides temporary authority transfer without granting more power than the original holder currently possesses.
delegation-temporary-access
Team members using this skill
When is it useful?
Use it for holiday cover, limited approval handoffs or temporary access that must end after expiry or revocation.
What does it help you do?
- Limits grants to the delegator’s own scope and thresholds.
- Rechecks source permissions, membership, expiration and revocation.
- Prevents self-approval and uncontrolled delegation chains.
Try asking this
Cover a manager’s holiday approvals without retaining access after their role changes. Revoke the manager's approval role during the holiday. The delegate must lose the corresponding authority immediately, including on previously opened approval links.
Detailed documentation
Read the skill’s original instructions, examples and checks in their authored language.
Show less
Delegation & Temporary Access
When to Use
Use when implementing temporary permission grants, out-of-office / vacation approval delegation, resource-scoped guest access, or time-bounded administrative elevation (JIT access).
Delegation Is Scoped Authorization, Never Role Cloning
Never implement delegation by copying the delegator's full role onto the delegatee or sharing credentials! A delegation grant is a first-class, bounded domain record (permission_delegations):
CREATE TABLE permission_delegations (
id UUID PRIMARY KEY,
tenant_id UUID NOT NULL,
delegator_user_id UUID NOT NULL,
delegatee_user_id UUID NOT NULL,
scoped_permissions TEXT[] NOT NULL, -- e.g. ['quote:approve', 'order:review']
resource_scope JSONB NOT NULL, -- e.g. { "departmentId": "dep_12", "maxAmount": 25000 }
starts_at TIMESTAMPTZ NOT NULL,
expires_at TIMESTAMPTZ NOT NULL,
can_subdelegate BOOLEAN NOT NULL DEFAULT FALSE,
revoked_at TIMESTAMPTZ,
reason TEXT NOT NULL
);
Five Invariants of Safe Delegation
1. No Privilege Amplification (Attenuation Rule)
- A delegator (
delegator_user_id) can only delegate a subset of the permissions, resource scopes, and value limits they personally hold at the time of grant creation. - Both
delegatoranddelegateemust be active members of the sametenant_id(unless an explicit external guest-share model applies).
2. Live Source-of-Authority Check (Dynamic Attenuation)
- A delegation grant is only valid while both the grant itself is active (
NOW() BETWEEN starts_at AND expires_at AND revoked_at IS NULL) and the originaldelegatorstill holds the underlying permission! - If the
delegatorleaves the company, is suspended, or loses theirsales_managerrole, all delegations originating from them must become invalid immediately at evaluation time.
3. Strict Prohibition of Unbounded Re-Delegation
- Default
can_subdelegatetofalse(depth= 1). If transitive delegation is ever allowed by business rules, enforce a hard maximum hop depth (e.g.,max_depth = 1or2) and prevent circular delegation loops (A -> B -> A).
4. Separation of Duties (SoD) Under Delegation
- A user who receives delegated approval authority from their manager still cannot approve their own request!
- Check
request.requester_id !== actor.idandrequest.requester_id !== delegation.delegator_user_id(a manager cannot delegate to a subordinate to approve the manager's own personal request).
- Check
5. Dual-Principal Audit Trail
- Whenever an action succeeds via a delegation grant, record
actor_id = delegatee_user_id,delegated_by_user_id = delegator_user_id, anddelegation_id = delegation.idin the approval and audit records.
Included files 1
SKILL.md
