Skip to content

Fix roles assignment in Rosetta user sync - #1037

Closed
dgpoo wants to merge 1 commit into
WordPress:trunkfrom
dgpoo:fix/rosetta-user-sync-roles
Closed

dgpoo wants to merge 1 commit into
WordPress:trunkfrom
dgpoo:fix/rosetta-user-sync-roles

Conversation

@dgpoo

@dgpoo dgpoo commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

Fix an incorrect property assignment in WordPressdotorg\Rosetta\User\Sync::__construct().

Changes

  • Assign $data->roles_to_sync to $this->roles_to_sync instead of $this->destination_site.
  • Prevent the destination site property from being overwritten by the roles array.

Testing

  • Verified the code diff.
  • Additional testing pending.

Related ticket

Linking this PR to Meta Trac ticket #8455:

https://meta.trac.wordpress.org/ticket/8455

Summary by CodeRabbit

  • Bug Fixes
    • Corrected role synchronization settings so they no longer overwrite the destination site configuration.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props daxinigaurav.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@coderabbitai

coderabbitai Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e6997516-7ee4-4fe6-87b6-777ab8ee7324




📥 Commits

Reviewing files that changed from the base of the PR and between cddeb14 and 8257d5a.





📒 Files selected for processing (1)
  • wordpress.org/public_html/wp-content/plugins/rosetta/inc/user/class-sync.php




Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.






📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The Sync constructor now assigns roles_to_sync data to the roles_to_sync property instead of destination_site.

Changes

Role sync assignment

Layer / File(s) Summary
Constructor property assignment
wordpress.org/public_html/wp-content/plugins/rosetta/inc/user/class-sync.php
The constructor stores roles_to_sync data in the matching property.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix








Merge Risk: ⚪ Minimal · up to 8257d

Role sync now retains the destination site and uses the configured role mapping; no actionable risk remains beyond normal checks.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: correcting the roles assignment in Rosetta user synchronization.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR







  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dgpoo
dgpoo force-pushed the fix/rosetta-user-sync-roles branch from 8257d5a to 7879b3e Compare October 10, 2026 08:05
@timse201

Copy link
Copy Markdown

See PR #1006

@timse201 timse201 closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants