Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-12-01 06:31:11 +01:00
Merge branch 'fix-emergency-invite-register' of https://github.com/BlackDex/vaultwarden into BlackDex-fix-emergency-invite-register
Dieser Commit ist enthalten in:
Commit
14e3dcad8e
1 geänderte Dateien mit 3 neuen und 6 gelöschten Zeilen
|
@ -87,14 +87,11 @@ fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult {
|
||||||
user_org.status = UserOrgStatus::Accepted as i32;
|
user_org.status = UserOrgStatus::Accepted as i32;
|
||||||
user_org.save(&conn)?;
|
user_org.save(&conn)?;
|
||||||
}
|
}
|
||||||
|
user
|
||||||
|
} else if EmergencyAccess::find_invited_by_grantee_email(&email, &conn).is_some() {
|
||||||
user
|
user
|
||||||
} else if CONFIG.is_signup_allowed(&email) {
|
} else if CONFIG.is_signup_allowed(&email) {
|
||||||
// check if it's invited by emergency contact
|
err!("Account with this email already exists")
|
||||||
match EmergencyAccess::find_invited_by_grantee_email(&data.Email, &conn) {
|
|
||||||
Some(_) => user,
|
|
||||||
_ => err!("Account with this email already exists"),
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
err!("Registration not allowed or user already exists")
|
err!("Registration not allowed or user already exists")
|
||||||
}
|
}
|
||||||
|
|
Laden …
In neuem Issue referenzieren