mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #1385] setting up invitation #935
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#935
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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?
Originally created by @DuredhelFinceleb on GitHub (Feb 12, 2021).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1385
Hi !
not sure if it's a bug or me doing something wrong
I'm using the docker image with -e flags (so no config via admin)
regarding inivitations, I've used INVITATIONS_ALLOWED=false
I've also disallowed creation of new users
My goal: I want people to come in on invitation only and I want the admin to be the only one able to send invitations
My problem is that even with INVITATIONS_ALLOWED=false, users can create org and from the the org management screen they can invite whoever they want
here's my config
-v /bw-data/:/data/
-p 3080:3080
-p 3012:3012
-u 1004:1005
-e ROCKET_PORT=3080
-e DOMAIN=https://example.com/vault/
-e IP_HEADER=X-Forwarded-For
-e WEBSOCKET_ENABLED=true
-e SIGNUPS_ALLOWED=false
-e INVITATIONS_ALLOWED=false
-e ADMIN_TOKEN=xxx
-e INVITATION_ORG_NAME=xxx
-e SMTP_HOST=example.com
-e SMTP_FROM=xxx@example.com
-e SMTP_PORT=587
-e SMTP_SSL=true
-e SMTP_USERNAME=xxx@example.com
-e SMTP_PASSWORD=xxx
-e SHOW_PASSWORD_HINT=false
-e LOG_FILE=/data/bitwarden.log \
In the admin I can see that my flags are respected

For the admin I can still see and make work the invitation system, but that does not bother me, I want that.
In the user's vault, in the Organization management I can still see the Invitation button.

If I click it the dialog appears and everything works: mail is sent, user can come in & create an account

Ideally I would like the button to just no be there.
If it has to stay there, then I'd like to get an error message when clicking on it or when clicking on Save in the dialog.
Could not find anything about this in the wiki nor in the issues.
Am I missing something?
Best regards
@thelittlefireman commented on GitHub (Feb 12, 2021):
hi,
It seems to have an error on organization/invite
github.com/dani-garcia/bitwarden_rs@c836f88ff2/src/api/core/organizations.rs (L508-L524)!CONFIG.invitations_allowedand!CONFIG.is_email_domain_allowed(&email)seems to not be on the right placeNone =>they should be inSometoo.I will try to reproduce and make a PR to fix this.
Reminder : Test with admin too
@BlackDex commented on GitHub (Feb 12, 2021):
No, it's at the right place.
It checks if the user is already in the system, if not (
none) it will do these checks. Else, the user is already invited before or via the admin interface and maybe be added.@thelittlefireman commented on GitHub (Feb 12, 2021):
you're right my bad.
@DuredhelFinceleb I cannot reproduce. As a user, I don't get any "invite a user" button. Do you use the latest version of web and server ?
@DuredhelFinceleb commented on GitHub (Feb 12, 2021):
AFAIK, I've got the latest version
@DuredhelFinceleb commented on GitHub (Feb 12, 2021):
OK guys I've got it
I must've forget to restart the container after changing my config (it's getting late...)
well I restarted the server to be sure and now when I click on save, I get a error 'user does not exist'
so users can still have organization but they can only invite people who already have an account => perfect!
thanks for the help and for pointing to the piece of code, it helped me a lot understanding what was the expected behaviour & how to test it