-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
BUGFIX: Ensure cache flushing for asset changes works with foreign workspaces #5415
BUGFIX: Ensure cache flushing for asset changes works with foreign workspaces #5415
Conversation
…rkspaces This is done by flushing the caches inside inside a securityContext->withoutAuthorizationChecks closure. Resolves: neos#5414
While this solves the problem from #5414 i am not sure wether and how to test this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Works as expected.
AFAIS the ContentRepositorySecurityTrait provides some helper for testing this. I gueess we need to extend some AssetUsage tests with an authenticated user and enabled contentrepository security. Line 35 in e339da0
See example: Lines 54 to 57 in e339da0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jup using the withoutAuthorizationChecks
is the way for now ... if this would have been triggered by a catchup hook we could use the ContentRepositoryReadModel directly (which ignored security) which is here not the case ... but just for reference: #5328
still if the time allows i think a test would be neat ^^ we seem to have steps like Then the asset "an-asset-to-change" has the title "First changed asset"
already in place, but its not that critical either i guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
If metadata of assets that are already used in workspaces the current user has no access to is changed the AssetChangeHandlerForCacheFlushing yields an exception
Read access denied for workspace ...
.This is fixed by flushing the caches inside inside a
securityContext->withoutAuthorizationChecks
closure.Resolves: #5414
Upgrade instructions
Review instructions
Checklist
FEATURE|TASK|BUGFIX
!!!
and have upgrade-instructions