mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-25 09:06:47 +02:00
Add Emergency contact feature
Signed-off-by: thelittlefireman <thelittlefireman@users.noreply.github.com>
This commit is contained in:
1 parent
8c10de3edd
commit
4ab9362971
37 files changed
+1619
-13
No files matched your search
@@ -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")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user