← ERP rendszer építők adatlapja
Nézd meg, miben segít
Ideiglenes delegált hozzáférés
Átmeneti jogátadást biztosít az eredeti jogosult aktuális hatáskörének túllépése nélkül.
delegation-temporary-access
Ezt a skillt használó csapattagok
Mikor hasznos?
Akkor használd, ha szabadságos helyettesítés, korlátozott jóváhagyási átadás vagy lejáró és visszavonható hozzáférés kell.
Miben segít neked?
- A delegáló saját hatáskörére és értékhatáraira korlátoz.
- Újraellenőrzi az eredeti jogot, tagságot, lejáratot és visszavonást.
- Tiltja az önjóváhagyást és korlátlan továbbdelegálást.
Például ezt kérheted
Oldd meg a vezető szabadságos helyettesítését szerepváltozás után fennmaradó jog nélkül. A szabadság alatt vond vissza a vezető jóváhagyói szerepét. A helyettes megfelelő joga azonnal szűnjön meg, a korábban megnyitott linkeken is.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
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.
Csomagban lévő fájlok 1
SKILL.md
