-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page $owns
does not respect asset canPublish
#383
Comments
I’m not sure of the best approach to fix this - instinctively I think that the changeset API itself should avoid these checks because it should always be possible to publish items programatically and ignore permission checks when doing so, and adding a requirement to either create or find an appropriate user to “act as” feels like a step in the wrong direction to me. We’ve taken steps to avoid that before, essentially saying “permission checks should be performed elsewhere”: #113 Perhaps we need to add an API to handle this? We currently have I think this does have potential BC risk, especially if we alter the behaviour of existing methods/APIs |
I hadn't considered the angle of publishing programatically, that's a good point. |
What if we add a new static boolean $recursive_publish_check Data extension on dataObject and it defaults to true? So before doing the $object->publishSingle on changeSetItem we check if the object has the static variable set and if so then check the objects canPublish. (just writing this down) I will write a new PR when I get the chance. It will still be a BC but users now has more option plus the fact that automated publishing task without a user can still work (I think, maybe incorrect) |
We had a chat about this. We can't fully address this it a minor and it's too late to make the CMS5 cut off. A solution like what @mark-a-j-adriano could probably be shipped in a minor. |
Error scenario:
ExpiryDate
field has not been added by the Content Editor.Expected:
Project setup:
How to re-create:
Photo
canPublish
)FileExtension:
Page:
Extension:
PRs
The text was updated successfully, but these errors were encountered: