Skip to content

Conversation

@leogermani
Copy link
Contributor

@leogermani leogermani commented Aug 4, 2020

This PR changes the token used to hit the jetpack.updateRole. It used to use the "Master user" token and now uses the current user token. It assumes that the user changing the role must have the proper capabilities to do so.

Changes proposed in this Pull Request:

  • jetpack.updateRole now uses the current user token

Jetpack product discussion

p9dueE-1Dv-p2#comment-2838

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Set up a connected Jetpack site
  • Create a second user and authorize it to a different WordPress.com account
  • Back to the first administrator, edit the second user and change its role
  • Check the WPCOM database to see if the change was applied. See 25ef5-pb/#plain

Proposed changelog entry for your changes:

    • jetpack.updateRole now uses the current user token

@github-actions github-actions bot added the [Status] Needs Package Release This PR made changes to a package. Let's update that package now. label Aug 4, 2020
@leogermani leogermani self-assigned this Aug 4, 2020
@jetpackbot
Copy link
Collaborator

jetpackbot commented Aug 4, 2020

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

E2E results is available here (for debugging purposes): https://jetpack-e2e-dashboard.herokuapp.com/pr-16710

Scheduled Jetpack release: September 1, 2020.
Scheduled code freeze: August 25, 2020

Generated by 🚫 dangerJS against c4b3a0e

@leogermani leogermani added this to the 8.9 milestone Aug 4, 2020
@leogermani leogermani force-pushed the update/updateRole_use_user_token branch from 105b7f2 to bd37e34 Compare August 5, 2020 18:44
@leogermani leogermani added the [Status] Needs Review This PR is ready for review. label Aug 5, 2020
@leogermani leogermani marked this pull request as ready for review August 5, 2020 18:44
@leogermani leogermani force-pushed the update/updateRole_use_user_token branch from bd37e34 to c4b3a0e Compare August 5, 2020 18:53
Copy link
Contributor

@fgiannar fgiannar left a comment

Choose a reason for hiding this comment

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

Hi @leogermani ,

Tested this and works as expected 👍

@fgiannar fgiannar added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Aug 10, 2020
@leogermani leogermani merged commit d2b375b into master Aug 10, 2020
@leogermani leogermani deleted the update/updateRole_use_user_token branch August 10, 2020 13:51
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Aug 10, 2020
@jeherve jeherve added Connect Flow Connection banners, buttons, ... [Package] Connection labels Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Connect Flow Connection banners, buttons, ... [Package] Connection [Status] Needs Package Release This PR made changes to a package. Let's update that package now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants