Skip to main content

may_define

Function may_define 

Source
pub(crate) fn may_define(
    who: &Who,
    def: &JobDefinition,
    current_owner: Option<&str>,
) -> Result<(), String>
Expand description

Whether who may define a job like def (§7): the operator any job; an agent, container or not, a message or task job it owns; a native agent a Drone job too, which a container agent can’t have as its runs start on the host. A spawn job needs the operator’s approval once (the spawn consent rule, made at creation since its runs are unattended), which has no flow yet, so an agent can’t create one. current_owner is the job’s owner on an edit.