Kantoor. Accounts. Scope
(Kantoor v1.0.0)
The caller of a context function. Every context function that acts on behalf of a user takes a scope as its first argument.
Summary
Types
An application the identity provider says this person may open, as the
switcher shows it (slug, name and launch URL; the icon is local to the
application). Empty without the provider's shiloh_apps claim.
Functions
True when the scope belongs to an admin.
Builds a scope for a user; nil for a missing or disabled user.
Types
An application the identity provider says this person may open, as the
switcher shows it (slug, name and launch URL; the icon is local to the
application). Empty without the provider's shiloh_apps claim.
@type t() :: %Kantoor.Accounts.Scope{ apps: [app()], apps_admin?: boolean(), user: Kantoor.Accounts.User.t() | nil }
Functions
True when the scope belongs to an admin.
@spec for_user(Kantoor.Accounts.User.t() | nil) :: t() | nil
Builds a scope for a user; nil for a missing or disabled user.