Browse Source
allow signup for invited users
invited users (e.g. via /admin panel or org invite) should be able to
register if email is disabled.
pull/5967/head
Stefan Melmuk
1 month ago
No known key found for this signature in database
GPG Key ID: 817020C608FE9C09
1 changed files with
4 additions and
1 deletions
-
src/api/identity.rs
|
@ -718,7 +718,10 @@ async fn register_verification_email( |
|
|
) -> ApiResult<RegisterVerificationResponse> { |
|
|
) -> ApiResult<RegisterVerificationResponse> { |
|
|
let data = data.into_inner(); |
|
|
let data = data.into_inner(); |
|
|
|
|
|
|
|
|
if !CONFIG.is_signup_allowed(&data.email) { |
|
|
// the registration can only continue if signup is allowed or there exists an invitation
|
|
|
|
|
|
if !(CONFIG.is_signup_allowed(&data.email) |
|
|
|
|
|
|| (!CONFIG.mail_enabled() && Invitation::find_by_mail(&data.email, &mut conn).await.is_some())) |
|
|
|
|
|
{ |
|
|
err!("Registration not allowed or user already exists") |
|
|
err!("Registration not allowed or user already exists") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|