Cleanups and Fixes for Emergency Access

- Several cleanups and code optimizations for Emergency Access
- Fixed a race-condition regarding jobs for Emergency Access
- Some other small changes like `allow(clippy::)` removals

Fixes #2925
This commit is contained in:
BlackDex
2022-11-26 19:07:28 +01:00
committed by Daniel García
parent b022be9ba8
commit 63fb0e5a57
12 changed files with 173 additions and 153 deletions

View File

@@ -721,7 +721,7 @@ async fn send_invite(
}
if !CONFIG.mail_enabled() {
let invitation = Invitation::new(email.clone());
let invitation = Invitation::new(&email);
invitation.save(&mut conn).await?;
}
@@ -871,7 +871,7 @@ async fn _reinvite_user(org_id: &str, user_org: &str, invited_by_email: &str, co
)
.await?;
} else {
let invitation = Invitation::new(user.email);
let invitation = Invitation::new(&user.email);
invitation.save(conn).await?;
}