Skip to main content

owner_gate

Function owner_gate 

Source
pub fn owner_gate(
    store_owner: Option<&Owner>,
    configured_id: Option<&str>,
    authed_user_id: &str,
    allow_change: bool,
) -> OwnerGate
Expand description

Decide whether an authenticated account may run against a library (PHASE 1).

A configured account_id that differs always aborts, even with allow_change set, because it is an explicit operator assertion. Otherwise an unpinned library defers to first-use adoption, a matching owner proceeds, and a differing owner either re-pins (when allow_change) or aborts.