Skip to content

Feat/add role user access controls#749

Open
Infinite-Null wants to merge 18 commits into
WordPress:developfrom
Infinite-Null:feat/add-role-user-access-controls
Open

Feat/add role user access controls#749
Infinite-Null wants to merge 18 commits into
WordPress:developfrom
Infinite-Null:feat/add-role-user-access-controls

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Closes: #736

Description

This PR introduces Feature-Level Access Controls exclusively for Editor Experiments, allowing site administrators to restrict access to individual AI-powered editor features based on specific WordPress roles or individual users.

Testing Instructions

  1. Navigate to AI Settings and enable Enable AI.
  2. Open the Developer Tools menu (three dots) and select Access controls.
  3. Under the "Editor Experiments" section, verify that the Roles and Users configuration panel appears beneath the feature toggles.
  4. Check a few roles (e.g., Editor, Author) for a specific feature and click Save. Verify the save is successful.
  5. In the Users field, search for a specific user and select them from the dropdown. Click Save.
  6. Refresh the page and verify that your selected roles and users persisted and display their correct names.
  7. Turn off "Access controls" from the Developer Tools menu, and verify that all selections are cleared.
  8. Verify Enforcements: Log in to the site as a user who does not possess the selected role and is not the selected user. Open the block editor and verify that the restricted experiment is not accessible or visible to them.
  9. Log in as the specifically selected user or a user with the granted role, and verify the feature is fully accessible.
  10. Turn off "Access controls" from the Developer Tools menu, and verify that all selections are cleared and the feature becomes globally available again.

Screencast

User: Ankit Shah | Role: Editor

Screen.Recording.2026-06-22.at.1.35.17.PM-compressed.mp4
Open WordPress Playground Preview

@Infinite-Null Infinite-Null marked this pull request as draft June 19, 2026 13:05
@github-actions

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

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

@Infinite-Null Infinite-Null marked this pull request as ready for review June 22, 2026 08:12
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.

Expose role/user access controls per feature/experiment

1 participant