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:
wafflecoffee
2022-07-23 21:47:32 -04:00
committed by GitHub
parent 6614b56298
commit b864791fa6
9 changed files with 32 additions and 19 deletions

View File

@@ -386,7 +386,7 @@ pub async fn transfer_ownership(
let current_user = get_user_from_headers(req.headers(), &**pool).await?;
if !current_user.role.is_mod() {
if !current_user.role.is_admin() {
let member = TeamMember::get_from_user_id(
id.into(),
current_user.id.into(),