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

Make membership unique per user and facility/org #524

Conversation

christophmeissner
Copy link
Contributor

It comes with a rather lengthy data migration for FacilityMembership and OrganizationMembership:

Duplicate memberships are squashed, keeping only the membership per user and facility/org with the highest (max) status, and if equal, with the highest (min) role.

If the user is no longer an manager or admin of any facility or organization, their is_staff flag will be set to False. They will no longer be able to use the admin interface (unless manually granted by another admin again).

fixes #492

@christophmeissner christophmeissner force-pushed the feature/492-make-membership-unique branch from c6142d6 to 3841372 Compare March 28, 2022 08:10
@christophmeissner christophmeissner added the ⚠️ Migration Includes a migration label Mar 28, 2022
@christophmeissner christophmeissner force-pushed the feature/492-make-membership-unique branch from 3841372 to 1e9f8df Compare March 28, 2022 16:47
It comes with a rather lengthy data migration for FacilityMembership and OrganizationMembership:

Duplicate memberships are squashed, keeping only the membership per user and facility/org with the highest (max) status, and if equal, with the highest (min) role.

If the user is no longer an manager or admin of any facility or organization, their `is_staff` flag will be set to `False`. They will no longer be able to use the admin interface (unless manually granted by another admin again).

fixes coders4help#492
@christophmeissner christophmeissner merged commit f33022f into coders4help:develop Mar 29, 2022
@christophmeissner christophmeissner deleted the feature/492-make-membership-unique branch March 29, 2022 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚠️ Migration Includes a migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Organization and facility members are not unique
2 participants