mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-06-23 04:10:20 +00:00
allow signup for invited users (#5967)
Build / Build and Test msrv (push) Has been cancelled
Build / Build and Test rust-toolchain (push) Has been cancelled
Check templates / docker-templates (push) Has been cancelled
Hadolint / Validate Dockerfile syntax (push) Has been cancelled
Release / Cancel older jobs when running (push) Has been cancelled
Release / Build Vaultwarden containers (alpine) (push) Has been cancelled
Release / Build Vaultwarden containers (debian) (push) Has been cancelled
Trivy / Trivy Scan (push) Has been cancelled
Build / Build and Test msrv (push) Has been cancelled
Build / Build and Test rust-toolchain (push) Has been cancelled
Check templates / docker-templates (push) Has been cancelled
Hadolint / Validate Dockerfile syntax (push) Has been cancelled
Release / Cancel older jobs when running (push) Has been cancelled
Release / Build Vaultwarden containers (alpine) (push) Has been cancelled
Release / Build Vaultwarden containers (debian) (push) Has been cancelled
Trivy / Trivy Scan (push) Has been cancelled
invited users (e.g. via /admin panel or org invite) should be able to register if email is disabled.
This commit is contained in:
+4
-1
@@ -718,7 +718,10 @@ async fn register_verification_email(
|
||||
) -> ApiResult<RegisterVerificationResponse> {
|
||||
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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user