aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2019-01-08 14:05:05 +0100
committerDaniel García <[email protected]>2019-01-08 14:05:05 +0100
commitf1161c65fb67c2f54a7c20b0f7aafdc2f9cd0af1 (patch)
tree27fa65e4192a4733dfe0e60cd3ddd6cee149d6c6
parent50eeb4f651b3e320d647bd6830097765ba3788eb (diff)
downloadvaultwarden-f1161c65fb67c2f54a7c20b0f7aafdc2f9cd0af1.tar.gz
vaultwarden-f1161c65fb67c2f54a7c20b0f7aafdc2f9cd0af1.zip
Make sure an invitation is created when reinviting
-rw-r--r--src/api/core/organizations.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/core/organizations.rs b/src/api/core/organizations.rs
index daa4faa6..38bb6021 100644
--- a/src/api/core/organizations.rs
+++ b/src/api/core/organizations.rs
@@ -545,8 +545,9 @@ fn reinvite_user(org_id: String, user_org: String, headers: AdminHeaders, conn:
Some(user) => user,
None => err!("User not found."),
};
-
- Invitation::take(&user.email, &conn);
+
+ let mut invitation = Invitation::new(user.email.clone());
+ invitation.save(&conn)?;
let org_name = match Organization::find_by_uuid(&org_id, &conn) {
Some(org) => org.name,