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

[BBT-54] Updates registered menu capability check #11

Merged
merged 1 commit into from
Jul 19, 2023

Conversation

chrishbite
Copy link
Contributor

@chrishbite chrishbite commented Jul 11, 2023

Description

Fixes: BBT-54

Updates the user capability used when adding the menu item for the Themer plugin.

Change Log

  • Changes user capability used when registering the admin page from manage_options to edit_theme_options

Steps to test

  1. Login as an Admin or Super Admin
  2. The menu item of Settings > Theme Customiser should be visible
  3. Click the above menu link, the Themer plugin should load
  4. Log out
  5. Login as a user with the role Editor
  6. Confirm that Settings > Theme Customiser isn't visible
  7. Attempt to visit */wp-admin/options-general.php?page=theme_settings
  8. The Sorry, you are not allowed to access this page. message should be displayed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@chrishbite chrishbite added the enhancement New feature or request label Jul 11, 2023
Copy link
Member

@g-elwell g-elwell left a comment

Choose a reason for hiding this comment

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

Tested using admin and editor roles, works as expected 👍

@chrishbite chrishbite merged commit 2db6688 into release/1.0.0 Jul 19, 2023
@g-elwell g-elwell mentioned this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants