Issue 35310 block folder delete when not empty#35398
Open
riccardoruocco wants to merge 8 commits into
Open
Conversation
…ttps://github.com/riccardoruocco/core into issue-35310-block-folder-delete-when-not-empty
Contributor
Author
|
I have agreed to the therms of the contributors agreements found here: https://gist.github.com/wezell/85ef45298c48494b90d92755b583acb3 |
jsanca
reviewed
Apr 23, 2026
…der-delete-when-not-empty
3 tasks
riccardoruocco
added a commit
to riccardoruocco/core
that referenced
this pull request
May 7, 2026
## Summary Cherry-pick of PR dotCMS#35398 — blocks folder deletion when the folder contains live content. - Prevents deleting folders that contain live (published) content items - Adds a configurable flag (`BLOCK_FOLDER_DELETE_WITH_LIVE_CONTENT`) to enable/disable the guard - Uses lazy initialization for the config flag ## Cherry-picked commits - `839ed42` block-folder-delete-with-live-content - `32e3936` Issue 35310: block folder delete when not empty - `1a12d71` Use Lazy for folder delete config flag Original PR: dotCMS#35398 ## Test plan - [ ] Attempt to delete a folder containing live content — should be blocked - [ ] Attempt to delete a folder with only unpublished content — should succeed - [ ] Verify config flag `BLOCK_FOLDER_DELETE_WITH_LIVE_CONTENT` toggles the behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) This PR fixes: dotCMS#35310 --------- Co-authored-by: RiccardoRuocco <ruocco.rf@gmail.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.
Proposed Changes
Checklist
Additional Info
This change is intentionally minimal and scoped to the existing folder delete action in the UI flow. It does not change backend delete APIs.
Screenshots
Updated

