From 221365bc9ad79a199c1e4e585d8c4591bb0d3e61 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 24 Oct 2023 17:30:47 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20bug=20when=20leaving=20admin=20team,=20se?= =?UTF-8?q?tting=20accepted=20application=20as=20true=E2=80=A6=20(#4090)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix bug when leaving admin team, setting accepted application as true. Fixes #3422 * Addressing PR comments. --- crates/api/src/site/leave_admin.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/api/src/site/leave_admin.rs b/crates/api/src/site/leave_admin.rs index f25747ef3..77e28332b 100644 --- a/crates/api/src/site/leave_admin.rs +++ b/crates/api/src/site/leave_admin.rs @@ -35,6 +35,9 @@ pub async fn leave_admin( local_user_view.local_user.id, &LocalUserUpdateForm { admin: Some(false), + // Necessary because admins can bypass the registration applications (if they're turned on) + // but then won't be able to log in because they haven't been approved. + accepted_application: Some(true), ..Default::default() }, )