Implement admin ability to enable/disable users

This commit is contained in:
janost
2020-11-30 23:12:56 +01:00
parent 9824d94a1c
commit 043aa27aa3
13 changed files with 63 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ db_object! {
#[primary_key(uuid)]
pub struct User {
pub uuid: String,
pub enabled: bool,
pub created_at: NaiveDateTime,
pub updated_at: NaiveDateTime,
pub verified_at: Option<NaiveDateTime>,
@@ -70,6 +71,7 @@ impl User {
Self {
uuid: crate::util::get_uuid(),
enabled: true,
created_at: now,
updated_at: now,
verified_at: None,

View File

@@ -116,6 +116,7 @@ table! {
table! {
users (uuid) {
uuid -> Text,
enabled -> Bool,
created_at -> Datetime,
updated_at -> Datetime,
verified_at -> Nullable<Datetime>,

View File

@@ -116,6 +116,7 @@ table! {
table! {
users (uuid) {
uuid -> Text,
enabled -> Bool,
created_at -> Timestamp,
updated_at -> Timestamp,
verified_at -> Nullable<Timestamp>,

View File

@@ -116,6 +116,7 @@ table! {
table! {
users (uuid) {
uuid -> Text,
enabled -> Bool,
created_at -> Timestamp,
updated_at -> Timestamp,
verified_at -> Nullable<Timestamp>,