Ghost user and migration finished!

This commit is contained in:
Daniel Hougaard
2024-02-22 05:00:25 +01:00
parent 0cfab8ab6b
commit 8333250b0b
24 changed files with 810 additions and 123 deletions
@@ -117,18 +117,23 @@ export const MemberListTab = () => {
if (!orgUser) return;
try {
if (currentWorkspace.e2ee) {
if (currentWorkspace.version === "v1") {
await addUserToWorkspace({
workspaceId,
userPrivateKey,
decryptKey: wsKey,
members: [{ orgMembershipId, userPublicKey: orgUser.user.publicKey }]
});
} else {
} else if (currentWorkspace.version === "v2") {
await addUserToWorkspaceNonE2EE({
projectId: workspaceId,
emails: [orgUser.user.email]
});
} else {
createNotification({
text: "Failed to add user to project, unknown project type",
type: "error"
});
}
createNotification({
text: "Successfully added user to the project",