Add Instance to users::Role

This commit is contained in:
Kitaiti Makoto 2021-11-22 23:05:28 +09:00
parent 7198b06a33
commit 94cc260803

View File

@ -52,6 +52,7 @@ pub enum Role {
Admin = 0, Admin = 0,
Moderator = 1, Moderator = 1,
Normal = 2, Normal = 2,
Instance = 3,
} }
#[derive(Queryable, Identifiable, Clone, Debug, AsChangeset)] #[derive(Queryable, Identifiable, Clone, Debug, AsChangeset)]
@ -78,6 +79,7 @@ pub struct User {
pub summary_html: SafeString, pub summary_html: SafeString,
/// 0 = admin /// 0 = admin
/// 1 = moderator /// 1 = moderator
/// 3 = local instance
/// anything else = normal user /// anything else = normal user
pub role: i32, pub role: i32,
pub preferred_theme: Option<String>, pub preferred_theme: Option<String>,