pub trait RuniqueUser: Send + Sync {
fn user_id(&self) -> crate::utils::pk::Pk;
fn username(&self) -> &str;
fn email(&self) -> &str;
fn is_active(&self) -> bool;
fn is_staff(&self) -> bool;
fn is_superuser(&self) -> bool;
fn can_sign_in(&self) -> bool {
self.is_active()
}
fn can_access_admin(&self) -> bool {
self.can_sign_in() && (self.is_staff() || self.is_superuser())
}
}