[PR #6247] Fix around singleorg policy #2431

Open
opened 2025-10-09 18:05:02 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/dani-garcia/vaultwarden/pull/6247

State: open
Merged: No


Should fix:

  • Prevent a user already in an org to join an organization with the single org policy activated
  • When activating the single org policy revoke the membership (as mentioned in the warning) instead of deleting.
  • Allow to restore an invitation

Moved all the logic back to the check_user_allowed instead of having to duplicate it from all call site, might make sense to move it out, inside a mod.rs maybe ?

Add the Admin and Invited membership test in check_user_allowed, means that all membership modification need to be done before calling the check.

**Original Pull Request:** https://github.com/dani-garcia/vaultwarden/pull/6247 **State:** open **Merged:** No --- Should fix: - Prevent a user already in an org to join an organization with the single org policy activated - When activating the single org policy revoke the membership (as mentioned in the warning) instead of deleting. - Allow to restore an invitation Moved all the logic back to the `check_user_allowed` instead of having to duplicate it from all call site, might make sense to move it out, inside a mod.rs maybe ? Add the Admin and Invited membership test in `check_user_allowed`, means that all membership modification need to be done before calling the check.
OVERLORD added the pull-request label 2025-10-09 18:05:02 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#2431