pub enum AdminStatus {
Active,
Disabled,
}Expand description
Whether a web-admin operator may sign in at all.
The two values admin_users.status’s CHECK allows, as a type rather than
as the free strings four call sites used to pass. The migration is frozen
and its spellings are the compatibility surface, so AdminStatus::as_str
answers the byte-identical value the column already holds – the
crates/store/src/status.rs treatment, kept here beside AdminRole because the
two are read together and neither is a state machine the way an order’s
status is.
Deliberately no from_storage: AdminUser::is_active is the only reader
and it already fails closed on a value outside the CHECK, which is the
direction a hand-edited row should fall.
Variants§
Active
May sign in.
Disabled
May not. Setting this also revokes every session the operator holds – a disabled account with a live cookie would be disabled in name only.
Implementations§
Trait Implementations§
Source§impl Clone for AdminStatus
impl Clone for AdminStatus
impl Copy for AdminStatus
Source§impl Debug for AdminStatus
impl Debug for AdminStatus
Source§impl Display for AdminStatus
impl Display for AdminStatus
impl Eq for AdminStatus
Source§impl Hash for AdminStatus
impl Hash for AdminStatus
Source§impl PartialEq for AdminStatus
impl PartialEq for AdminStatus
impl StructuralPartialEq for AdminStatus
Auto Trait Implementations§
impl Freeze for AdminStatus
impl RefUnwindSafe for AdminStatus
impl Send for AdminStatus
impl Sync for AdminStatus
impl Unpin for AdminStatus
impl UnsafeUnpin for AdminStatus
impl UnwindSafe for AdminStatus
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more