You've already forked AstralRinth
forked from didirus/AstralRinth
Limit 'superuser' status of current moderators (#386)
Resolves MOD-88 Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
@@ -77,4 +77,11 @@ impl Role {
|
||||
Role::Moderator | Role::Admin => true,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_admin(&self) -> bool {
|
||||
match self {
|
||||
Role::Developer | Role::Moderator => false,
|
||||
Role::Admin => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user