Repository navigation
fix: require publish permission to manage scheduled actions - #239
Merged
TMSchipper merged 4 commits intoNov 25, 2026
Merged
Conversation
fix: don't let a null field in an action update bypass the permission check (#212) Make the playground closer to a real project, so scheduling is tested against relations, components, dynamic zones and localized content instead of an article with only a title and body
TMSchipper
force-pushed
the
bugfix/212-restrict-plugin-users-without-permission
branch
from
November 14, 2026 13:20
d570f84 to
5c0832e
Compare
TMSchipper
marked this pull request as ready for review
November 16, 2026 09:18
TMSchipper
deleted the
bugfix/212-restrict-plugin-users-without-permission
branch
November 25, 2026 16:23
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.
Closes #212
Problem
The admin routes of the plugin (
/publisher/actions) were open to every authenticated admin user. A user whose role may create or edit entries but not publish them could still set a publish or unpublish date in the side panel, and the plugin would then publish or unpublish the entry at that time. That bypassed the Content ManagerPublishpermission.Solution
The admin routes now follow the user's Content Manager permissions on the content type the action targets:
/actions: new route policyplugin::publisher.can-manage-action. Only lets the request through when the user has thePublishpermission (which also covers unpublish) on the target, including its conditions (e.g. "is creator") and the locale the action runs in. Otherwise it returns a 403 with a clear message, which the admin shows as a notification.null(e.g.locale: null) is treated as an actual change./actions: new route middlewareplugin::publisher.limit-to-readable-content-types. Only returns actions of content types the user can read. Existing filters are combined with it, not replaced.permissionService, which uses Strapi's Content Managerpermission-checkerandpopulate-builderto evaluate permissions the same way the Content Manager does when publishing.The Content API routes (
/api/publisher/actions) are unchanged. Access to them is still managed by Users & Permissions or API token permissions.Testing
tests/permissions.js(runs in CI):playground/scripts/smoke-test/(node:test, Strapi starts once) with shared helpers inlib/.en+nl; Author; Category), so scheduling and locale-restricted permissions can be tested by hand.Manual test
yarn develop, then create a role with Article create/read/update permissions but without Publish, and a user with that role.Docs