Skip to main content

grant_as

Function grant_as 

Source
pub(crate) fn grant_as(
    state: &AppState,
    by_id: &str,
    by_name: &str,
    yourself: Option<&AgentDefinition>,
    body: &GrantBody,
) -> Result<Value, String>
Expand description

A grant, recorded under by_name (by_id). With no agent in the body it goes to yourself, which a caller from another machine has none of: it names the agent here.