[GH-ISSUE #4640] Cannot re-send invitation to organisation when invitations_allowed==false #14728

Closed
opened 2026-04-23 06:28:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @tribut on GitHub (Jun 12, 2024).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4640

Subject of the issue

When invitations_allowed is set to false, the button "Resend invitation" in the organization view does not work. Instead, the error message "Invitations are not allowed" is shown.

Your environment (Generated via diagnostics page)

  • Vaultwarden version: v1.30.5
  • Web-vault version: v2024.1.2b
  • OS/Arch: linux/x86_64
  • Running within a container: true (Base: Debian)
  • Environment settings overridden: false
  • Uses a reverse proxy: true
  • IP Header check: true (X-Forwarded-For)
  • Internet access: true
  • Internet access via a proxy: false
  • DNS Check: true
  • Browser/Server Time Check: true
  • Server/NTP Time Check: true
  • Domain Configuration Check: true
  • HTTPS Check: true
  • Database type: SQLite
  • Database version: 3.44.0
  • Clients used:
  • Reverse proxy and version:
  • Other relevant information:

Steps to reproduce

  1. Disable invitations_allowed
  2. Invite an existing user to an organization
  3. On the members tab, click the three-dot-menu next to the user and select "resend invitation"

Expected behaviour

The invitation email is resent.

Actual behaviour

The error message "Invitations are not allowed" is shown.

Originally created by @tribut on GitHub (Jun 12, 2024). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4640 ### Subject of the issue When `invitations_allowed` is set to `false`, the button "Resend invitation" in the organization view does not work. Instead, the error message "Invitations are not allowed" is shown. ### Your environment (Generated via diagnostics page) * Vaultwarden version: v1.30.5 * Web-vault version: v2024.1.2b * OS/Arch: linux/x86_64 * Running within a container: true (Base: Debian) * Environment settings overridden: false * Uses a reverse proxy: true * IP Header check: true (X-Forwarded-For) * Internet access: true * Internet access via a proxy: false * DNS Check: true * Browser/Server Time Check: true * Server/NTP Time Check: true * Domain Configuration Check: true * HTTPS Check: true * Database type: SQLite * Database version: 3.44.0 * Clients used: * Reverse proxy and version: * Other relevant information: ### Steps to reproduce 1. Disable `invitations_allowed` 2. Invite an existing user to an organization 3. On the members tab, click the three-dot-menu next to the user and select "resend invitation" ### Expected behaviour The invitation email is resent. ### Actual behaviour The error message "Invitations are not allowed" is shown.
GiteaMirror added the bug label 2026-04-23 06:28:46 -05:00
Author
Owner

@BlackDex commented on GitHub (Jun 12, 2024):

Thanks, looks like we need to move that check and depend on if the user already had an account on the system.

<!-- gh-comment-id:2163043056 --> @BlackDex commented on GitHub (Jun 12, 2024): Thanks, looks like we need to move that check and depend on if the user already had an account on the system.
Author
Owner

@stefan0xC commented on GitHub (Jun 25, 2024):

This check is also wrong, if a user already exists they should be accepted immediately if mail is disabled:
https://github.com/dani-garcia/vaultwarden/blob/a4c7fadbf4ffa242fb78ebd152080028e7f2993c/src/api/core/organizations.rs#L1004-L1006
(This should only happen in case you had mail enabled invited a user and then disabled mails before the user accepted the invitation.)

<!-- gh-comment-id:2188085873 --> @stefan0xC commented on GitHub (Jun 25, 2024): This check is also wrong, if a user already exists they should be accepted immediately if mail is disabled: https://github.com/dani-garcia/vaultwarden/blob/a4c7fadbf4ffa242fb78ebd152080028e7f2993c/src/api/core/organizations.rs#L1004-L1006 (This should only happen in case you had mail enabled invited a user and then disabled mails before the user accepted the invitation.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#14728