Skip to content

New: add new caps for privacy policy#26

Merged
brettsmason merged 26 commits into
mainfrom
feature/add-privacy-policy-permissions-to-editors
Oct 30, 2025
Merged

New: add new caps for privacy policy#26
brettsmason merged 26 commits into
mainfrom
feature/add-privacy-policy-permissions-to-editors

Conversation

@DanielHudson2

Copy link
Copy Markdown
Member

@brettsmason adding this for you to get your thoughts, for editors to edit the privacy policy it requires the following capabilities: manage_privacy_options and manage_options

But this would mean giving them access to the whole settings section so not sure on it

@DanielHudson2 DanielHudson2 self-assigned this Oct 23, 2025
@DanielHudson2 DanielHudson2 linked an issue Oct 23, 2025 that may be closed by this pull request
@brettsmason

Copy link
Copy Markdown
Member

I wonder if we can use this filter? https://github.com/WordPress/wordpress-develop/blob/b482707cf7cfca3edc44f19ecb55125689bedbd2/src/wp-includes/capabilities.php#L879

Potentially allow removing manage_options, as I'd rather not grant that, unless you disagree.

@DanielHudson2

Copy link
Copy Markdown
Member Author

@brettsmason i've amended this to move into its own class under Capabilities/Privacy (i've rebased onto main because of the plugin restructure which is why theres so many changes now)

The class just removes the meta cap of "manage_options" from "manage_privacy_options" for editors and shop managers

@brettsmason brettsmason merged commit ce3baf4 into main Oct 30, 2025
@brettsmason brettsmason deleted the feature/add-privacy-policy-permissions-to-editors branch October 30, 2025 13:36
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.

Privacy Policy permissions

3 participants