Fix bug when leaving admin team, setting accepted application as true… (#4090)

* Fix bug when leaving admin team, setting accepted application as true. Fixes #3422

* Addressing PR comments.
private_message_to_self_bug
Dessalines 2023-10-24 17:30:47 -04:00 committed by GitHub
parent 2df21b9d83
commit 221365bc9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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()
},
)