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

My Site Menu: Plugins item - Update visibility rule #19241

Merged
merged 2 commits into from
Sep 26, 2023

Conversation

zwarm
Copy link
Contributor

@zwarm zwarm commented Sep 22, 2023

Fixes #19240

This PR fixes the issue where the My Site "plugins" menu item was showing for users who did not have manage options capabilities.

To test:

  • Install the app
  • Login

User does not have manage options capabilities for selected site

  • Select a site that is [JP connected, uses the wp com rest api, and the user does not have manage options capabilities (use editor)]
  • Navigate to My Site > Menu tab
  • ✅ Verify the "plugins" item is not shown under the Manage header

User has manage options

  • Select a site that is JP connected, is using the wp com rest api, and the user does have manage options capabilities (use admin)
  • Navigate to My Site > Menu tab
  • ✅ Verify the "plugins" item is shown under the Manage header

Self hosted site

  • Select a site that is self hosted and you have admin capabilities
  • Navigate to My Site > Menu tab
  • ✅ Verify the "plugins" item is shown under the Manage header

Regression Notes

  1. Potential unintended areas of impact
    The "plugins" item shows when it shouldn't or it doesn't show when it should

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual testing

  3. What automated tests I added (or what prevented me from doing so) N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist: N/A

@zwarm zwarm added this to the 23.4 milestone Sep 22, 2023
@zwarm zwarm requested review from enejb and AjeshRPai September 22, 2023 17:59
@zwarm zwarm self-assigned this Sep 22, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 22, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr19241-05e9a13
Commit05e9a13
Direct Downloadwordpress-prototype-build-pr19241-05e9a13.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 22, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr19241-05e9a13
Commit05e9a13
Direct Downloadjetpack-prototype-build-pr19241-05e9a13.apk
Note: Google Login is not supported on these builds.

Copy link
Contributor

@AjeshRPai AjeshRPai left a comment

Choose a reason for hiding this comment

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

Hey @zwarm
I have tested the changes in all the below scenarios. It is working as expected 👍🏼

  1. User doesn't have Manage options capability and is Jetpack Site - Plugins menu item is not shown 🟢 . I tested using editor role which doesnt have manage options capability - Reference
  2. User has Manage options capability and Is Jetpack site - Plugins menu item is shown 🟢
  3. User has Manage options and is Self hosted site - Plugins menu item is shown 🟢

Approving, but not merging so that @enejb can have a look. Feel free to merge so when convenient.

@enejb
Copy link
Contributor

enejb commented Sep 25, 2023

Thanks for working on this @zwarm and @AjeshRPai the changes look good to me as well!

@AjeshRPai AjeshRPai merged commit d7a5a32 into trunk Sep 26, 2023
@AjeshRPai AjeshRPai deleted the issue/19240-plugin-menu-item-shown branch September 26, 2023 04:40
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.

My Site Menu: Plugin menu item is shown when user doesn't have manage options capability
4 participants