feat: add is_admin to User, count_users, ProviderConfigRepository trait, admin migration
This commit is contained in:
@@ -10,6 +10,7 @@ pub(super) struct UserRow {
|
||||
pub subject: String,
|
||||
pub email: String,
|
||||
pub password_hash: Option<String>,
|
||||
pub is_admin: i64,
|
||||
pub created_at: String,
|
||||
}
|
||||
|
||||
@@ -36,6 +37,7 @@ impl TryFrom<UserRow> for User {
|
||||
row.subject,
|
||||
email,
|
||||
row.password_hash,
|
||||
row.is_admin != 0,
|
||||
created_at,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user