pub struct TenantRegistration<U> { /* private fields */ }Expand description
A panel’s tenant registration page, installed with
Auth::tenant_registration: the TenantRegistrar that
creates tenants, and whether a user who acts for none must create one first.
let auth = Auth::custom(StaffAuth).tenant_registration(TenantRegistration::new(StaffAuth).required());U is the user type the registrar loads; Auth takes only one over the type its
authenticator loads.
Implementations§
Source§impl<U: PanelUser> TenantRegistration<U>
impl<U: PanelUser> TenantRegistration<U>
Sourcepub fn new(registrar: impl TenantRegistrar<User = U>) -> Self
pub fn new(registrar: impl TenantRegistrar<User = U>) -> Self
Registers tenants through registrar. A user who acts for no tenant still reaches the
panel, and its resources that need a tenant answer 403; see required.
Sourcepub fn required(self) -> Self
pub fn required(self) -> Self
Sends a signed-in user who acts for no tenant to the registration page before anything else: a page answers with a redirect to it and any other request with 403, as for an unverified address, which comes first. Leave it off where some users, such as operators, act for no tenant on purpose.
Trait Implementations§
Auto Trait Implementations§
impl<U> !RefUnwindSafe for TenantRegistration<U>
impl<U> !UnwindSafe for TenantRegistration<U>
impl<U> Forget for TenantRegistration<U>
impl<U> Freeze for TenantRegistration<U>
impl<U> Move for TenantRegistration<U>
impl<U> Send for TenantRegistration<U>
impl<U> Sync for TenantRegistration<U>
impl<U> Unpin for TenantRegistration<U>
impl<U> UnsafeUnpin for TenantRegistration<U>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more