1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-22 05:10:29 +01:00

Refactor invited_by_email check

Dieser Commit ist enthalten in:
Nick Fox 2019-01-05 13:46:45 -05:00
Ursprung 2f5bdc23f6
Commit 7db66f73f0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 82719985805A7CA8

Datei anzeigen

@ -609,9 +609,9 @@ fn accept_invite(_org_id: String, _org_user_id: String, data: JsonUpcase<AcceptD
Some(org) => org.name, Some(org) => org.name,
None => String::from("bitwarden_rs"), None => String::from("bitwarden_rs"),
}; };
if claims.invited_by_email.is_some() { if let Some(invited_by_email) = &claims.invited_by_email {
// User was invited to an organization, so they must be confirmed manually after acceptance // User was invited to an organization, so they must be confirmed manually after acceptance
mail::send_invite_accepted(&claims.email, &claims.invited_by_email.unwrap(), &org_name, mail_config)?; mail::send_invite_accepted(&claims.email, invited_by_email, &org_name, mail_config)?;
} else { } else {
// User was invited from /admin, so they are automatically confirmed // User was invited from /admin, so they are automatically confirmed
mail::send_invite_confirmed(&claims.email, &org_name, mail_config)?; mail::send_invite_confirmed(&claims.email, &org_name, mail_config)?;