Fix around singleorg policy #375

Closed
opened 2026-04-05 21:04:15 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @Timshel on 8/28/2025

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.

*Originally created by @Timshel on 8/28/2025* 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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#375