-
Notifications
You must be signed in to change notification settings - Fork 108
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
Fix deleting sub objects of locked folders if folder is selected #848
Fix deleting sub objects of locked folders if folder is selected #848
Conversation
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.
PR Overview
This PR fixes an issue whereby sub objects of locked folders are incorrectly deleted when the folder itself is selected. Key changes include the filtering of deleted items to remove those that are not allowed and updating the logic that determines if any deletable items remain.
Reviewed Changes
File | Description |
---|---|
public/js/pimcore/elementservice.js | Added filtering to remove items not allowed to be deleted; redundant filtering remains when checking for deletable items. |
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
public/js/pimcore/elementservice.js:56
- Since res.itemResults has already been filtered to include only allowed items on line 54, consider replacing this redundant filter with a direct length check, e.g., hasDeleteable = res.itemResults.length > 0.
hasDeleteable = res.itemResults.filter(function (result) {
|
Resolves #847