pub struct Organization { /* private fields */ }Expand description
The organization plugin: .plugin(Organization::default()).
Implementations§
Source§impl Organization
impl Organization
Sourcepub fn roles(self, roles: Roles) -> Self
pub fn roles(self, roles: Roles) -> Self
The roles members can hold and what each may do. Default: Roles::new().
Sourcepub fn allow_user_to_create_organization(self, allow: bool) -> Self
pub fn allow_user_to_create_organization(self, allow: bool) -> Self
Whether signed-in users may create organizations over HTTP (default true). The
server API’s create works either way.
Sourcepub fn organization_limit(self, limit: u64) -> Self
pub fn organization_limit(self, limit: u64) -> Self
How many organizations one user may belong to before creating another is refused (default: no limit).
Sourcepub fn invitation_ttl(self, ttl: Duration) -> Self
pub fn invitation_ttl(self, ttl: Duration) -> Self
How long an invitation can be accepted (default 48 hours).
Sourcepub fn invitation_url(self, template: impl Into<String>) -> Self
pub fn invitation_url(self, template: impl Into<String>) -> Self
The link invitation emails carry, with {id} replaced by the invitation id, e.g.
"https://app.acme.dk/invite/{id}". Default: {base_url}/accept-invitation/{id}. The
page behind it calls /organization/accept-invitation with the id.
Sourcepub fn require_email_verification_on_invitation(self, require: bool) -> Self
pub fn require_email_verification_on_invitation(self, require: bool) -> Self
Only users with a verified email may view, accept or reject invitations (default
false). Invitation ids are unguessable, so possessing the link is the default proof.
Trait Implementations§
Source§impl Clone for Organization
impl Clone for Organization
Source§impl Debug for Organization
impl Debug for Organization
Source§impl Default for Organization
impl Default for Organization
Source§impl Plugin for Organization
impl Plugin for Organization
Source§const ID: &'static str = "organization"
const ID: &'static str = "organization"
Source§type Requires = ()
type Requires = ()
(), (Organization,).Source§type UserFields = ()
type UserFields = ()
user; () for none.Source§type SessionFields = OrganizationSession
type SessionFields = OrganizationSession
session; () for none.Source§fn schema(&self, schema: &mut SchemaBuilder)
fn schema(&self, schema: &mut SchemaBuilder)
schema.model::<M>()) or columns. UserFields and SessionFields are
added automatically.