mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-24 12:33:58 +00:00
Add Emergency contact feature
Signed-off-by: thelittlefireman <thelittlefireman@users.noreply.github.com>
This commit is contained in:
parent
8c10de3edd
commit
4ab9362971
37 changed files with 1619 additions and 13 deletions
|
@ -89,7 +89,12 @@ fn register(data: JsonUpcase<RegisterData>, conn: DbConn) -> EmptyResult {
|
|||
|
||||
user
|
||||
} else if CONFIG.is_signup_allowed(&email) {
|
||||
err!("Account with this email already exists")
|
||||
// check if it's invited by emergency contact
|
||||
if EmergencyAccess::find_invited_by_grantee_email(&data.Email, &conn).is_some() {
|
||||
user
|
||||
} else {
|
||||
err!("Account with this email already exists")
|
||||
}
|
||||
} else {
|
||||
err!("Registration not allowed or user already exists")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue