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:
@@ -65,7 +65,7 @@ pub async fn user_follows(
|
||||
.await?;
|
||||
|
||||
if let Some(id) = id_option {
|
||||
if !user.role.is_mod() && user.id != id.into() {
|
||||
if !user.role.is_admin() && user.id != id.into() {
|
||||
return Err(ApiError::CustomAuthentication(
|
||||
"You do not have permission to see the projects this user follows!".to_string(),
|
||||
));
|
||||
|
||||
@@ -309,7 +309,7 @@ pub async fn delete_file(
|
||||
?;
|
||||
|
||||
if let Some(row) = result {
|
||||
if !user.role.is_mod() {
|
||||
if !user.role.is_admin() {
|
||||
let team_member =
|
||||
database::models::TeamMember::get_from_user_id_version(
|
||||
database::models::ids::VersionId(row.version_id),
|
||||
|
||||
Reference in New Issue
Block a user