Plugin: Sync the workshop internal notes cap mapping with the Internal Notes plugin - #3665
Merged
Merged
Conversation
…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>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Internal Notes plugin checks
read-notes,create-noteanddelete-note, and passes the note rather than its parent post when checkingdelete-note. Learn's workshop-specific override ininc/capabilities.phpstill 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 owndo_not_allowresults in place so log notes and unsupported post types behave as before.Testing
Ran both plugins'
map_meta_capcallbacks 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 tomanage_workshop_internal_notes; other post types resolve to the Internal Notes plugin's default mapping.phpcspasses on the changed file.🤖 Generated with Claude Code