Skip to main content

current_principal

Function current_principal 

Source
pub fn current_principal() -> Option<Arc<Principal>>
Expand description

Borrow the principal active for the current execute scope, if any.

Returns None outside a scoped_with_principal scope (e.g., low-level unit tests that bypass Session).