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

feat: sync multiple user roles #187

Merged
merged 5 commits into from
Jan 20, 2025
Merged

Conversation

laurelfulford
Copy link
Contributor

@laurelfulford laurelfulford commented Jan 15, 2025

This PR updates the manual syncing to sync multiple user roles to support plugins like Members.

See: 1200550061930446-as-1209086108652380

Steps to test:

  1. Download and install Members (ping me if you need a copy!).
  2. Set up some users with more than one role.
  3. Try manually syncing those users to other sites using the "Sync user across network" button on each profile.
  4. Note that only one role is sent, and applied to the reader when synced.
  5. Apply this PR.
  6. Repeat manually syncing users; confirm that multiple roles are sent in the logs and applied to the user.
  7. Try a few variations of changes, including only adding or only removing roles, and completely switching the set of roles applied to the reader.
  8. Disable Members and repeat testing syncing user roles of existing users. Note that if you sync a user at this point without resaving them, multiple roles will still be assigned to them. You'll need to resave the user's profile to get them back down to the default one role.
  9. Smoke test creating new users, changing their roles, and syncing them across the network to make sure things still work as expected when Members is not active.

@laurelfulford laurelfulford marked this pull request as ready for review January 15, 2025 19:48
@laurelfulford laurelfulford requested a review from a team as a code owner January 15, 2025 19:48
Copy link
Contributor

@leogermani leogermani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as described!

@laurelfulford
Copy link
Contributor Author

laurelfulford commented Jan 20, 2025

Thanks @leogermani!

@laurelfulford laurelfulford merged commit 9fa833c into trunk Jan 20, 2025
4 checks passed
@laurelfulford laurelfulford deleted the feat/sync-multiple-roles branch January 20, 2025 21:59
Copy link

Hey @laurelfulford, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jan 23, 2025
# [2.5.0-alpha.1](v2.4.0...v2.5.0-alpha.1) (2025-01-23)

### Bug Fixes

* **content-distribution:** block additional UI components ([#197](#197)) ([3f30cdb](3f30cdb))
* **content-distribution:** handling multiple post meta ([#199](#199)) ([c93084d](c93084d))
* **content-distribution:** Improve CSS for blocked editor ([#193](#193)) ([295bdad](295bdad)), closes [#181](#181)
* **content-distribution:** persist site hash ([#186](#186)) ([120b759](120b759))
* **content-distribution:** prevent consecutive dispatches ([#198](#198)) ([2149a62](2149a62))
* **content-distribution:** refactor outgoing post js ([#188](#188)) ([cc08edc](cc08edc))
* **memberships:** remove managed fields on cancel or expire ([#192](#192)) ([67a5cf0](67a5cf0))

### Features

* **content-distribution:** Block the editor for incoming posts ([#181](#181)) ([48b4cae](48b4cae))
* **content-distribution:** confirm dialog for unlinking and relinking posts ([#190](#190)) ([f36bb28](f36bb28))
* **content-distribution:** migrator ([#185](#185)) ([06ec18a](06ec18a))
* **content-distribution:** post status on create ([#189](#189)) ([1ad3e0c](1ad3e0c))
* sync multiple user roles ([#187](#187)) ([9fa833c](9fa833c))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 2.5.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants