Skip to content

Plugin: Sync the workshop internal notes cap mapping with the Internal Notes plugin - #3665

Merged
obenland merged 2 commits into
trunkfrom
update/internal-notes-cap-mapping
Sep 8, 2026
Merged

Plugin: Sync the workshop internal notes cap mapping with the Internal Notes plugin#3665
obenland merged 2 commits into
trunkfrom
update/internal-notes-cap-mapping

Conversation

@obenland

@obenland obenland commented Sep 8, 2026

Copy link
Copy Markdown
Member

The Internal Notes plugin checks read-notes, create-note and delete-note, and passes the note rather than its parent post when checking delete-note. Learn's workshop-specific override in inc/capabilities.php still matched an older set of names, so it was not being applied.

This updates the override to the current names, resolves the parent post for delete-note, and leaves the Internal Notes plugin's own do_not_allow results in place so log notes and unsupported post types behave as before.

Testing

Ran both plugins' map_meta_cap callbacks in hook order against workshop, lesson plan, log note, plain post and missing post cases for an Editor and a Tutorial Reviewer. Workshop notes resolve to manage_workshop_internal_notes; other post types resolve to the Internal Notes plugin's default mapping.

phpcs passes on the changed file.

🤖 Generated with Claude Code

…l Notes plugin

The Internal Notes plugin checks `read-notes`, `create-note` and `delete-note`, and passes the note rather than its parent post when deleting. Update the workshop override to match, and leave the plugin's own denials in place.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 8, 2026 18:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@obenland
obenland merged commit 7910bad into trunk Sep 8, 2026
1 check passed
@obenland
obenland deleted the update/internal-notes-cap-mapping branch September 8, 2026 19: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.

2 participants