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.
This commit is contained in:
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

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