mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-10 01:10:09 +03:00
[PR #173] [MERGED] Implement poor man's invitation via Organization invitation #3818
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dani-garcia/vaultwarden/pull/173
Author: @mprasil
Created: 9/10/2018
Status: ✅ Merged
Merged: 9/11/2018
Merged by: @dani-garcia
Base:
master← Head:poormans_invites📝 Commits (2)
ec05f14Implement poor man's invitation via Organization invitationc1cd4d9Modify User::new to be keyless and paswordless📊 Changes
10 files changed (+155 additions, -39 deletions)
View changed files
📝
README.md(+16 -1)➕
migrations/2018-09-10-111213_add_invites/down.sql(+1 -0)➕
migrations/2018-09-10-111213_add_invites/up.sql(+3 -0)📝
src/api/core/accounts.rs(+26 -7)📝
src/api/core/organizations.rs(+44 -24)📝
src/db/models/mod.rs(+1 -1)📝
src/db/models/organization.rs(+8 -1)📝
src/db/models/user.rs(+48 -5)📝
src/db/schema.rs(+6 -0)📝
src/main.rs(+2 -0)📄 Description
This should allow invitation-only registration via Organization invitations. The way it works follows the suggested approach outlined in #40. When Admin/Owner invites user with an email that is not found, a new record in
invitationstable is created. At the same time anUseris created with random password and key generated just as a "placeholder".When user tries to register, they will be allowed to do so even if SIGNUPS_ALLOWED is set to false if their email is in the invitations table.
This should also allow user to register without the placeholder
Useralready being present, which would accommodate some external integration like the one suggested by @ViViDboarder. But we'd have to document that kind of usage.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.