Fix registration openess condition mistake

This commit is contained in:
Kitaiti Makoto 2022-01-12 09:19:48 +09:00
parent 5d58b31f1c
commit 9bbfc71fc8

View File

@ -71,11 +71,11 @@ pub fn create(
rockets: PlumeRocket,
_enabled: signups::Email,
) -> Result<RespondOrRedirect, Ructe> {
let registration_open = !Instance::get_local()
let registration_open = Instance::get_local()
.map(|i| i.open_registrations)
.unwrap_or(true);
if registration_open {
if !registration_open {
return Ok(Flash::error(
Redirect::to(uri!(super::user::new)),
i18n!(