Skip to main content

validate_lifecycle_authorization

Function validate_lifecycle_authorization 

Source
pub async fn validate_lifecycle_authorization(
    initiator: &ActorRecord,
    target: &ActorRecord,
    _op: &LifecycleOp,
) -> KernelResult<()>
Expand description

Validate that the initiator is authorized to perform a lifecycle operation on the target actor (PIP-001 §5/§6 authorization rules).

PIP-001 §5/§6: Only Humans can create Agents, so only Humans can manage Agents.

InitiatorTargetAllowed
humanown agentyes
agentanyno
rootany agentyes