Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot re-send invitation to organisation when invitations_allowed==false #4640

Open
tribut opened this issue Jun 12, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@tribut
Copy link

tribut commented Jun 12, 2024

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.

@BlackDex BlackDex added the bug Something isn't working label Jun 12, 2024
@BlackDex
Copy link
Collaborator

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

@stefan0xC
Copy link
Contributor

This check is also wrong, if a user already exists they should be accepted immediately if mail is disabled:

if !CONFIG.mail_enabled() {
err!("SMTP is not configured.")
}

(This should only happen in case you had mail enabled invited a user and then disabled mails before the user accepted the invitation.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants