Skip to main content

may_change_job

Function may_change_job 

Source
fn may_change_job(caller: Option<&Caller>, job: &CronJob) -> bool
Expand description

Whether caller may pause, resume or delete job. An agent (a request carrying its token) may change only a job it created or owns, or one aimed at it; everyone else, the UI included, may change any job. Unattributed requests can’t be refused: at the same-user boundary one that omits its token looks like the UI (caller.rs). This stops an agent changing another agent’s job by mistake, not a determined one. A job with no recorded creator UID (created before identity M4c-1, or unattributed) is open to any caller. Editing the definition is narrower: may_edit_job.