1Panel-dev / 1Panel-dev/1Panel
[Feature] Accidental deletion prevention mechanism for favorite files/directories
Open
@wanghe-fit2cloud is already working on this.
Since Jun 17, 2026.
type: feature-request
- Dominant language
- Go
- Stars
- 37k
- Forks
- 3.4k
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 105
Description
1Panel Version
2.2.2
Please describe your needs or suggestions for improvements
我们偶尔会遇到误删文件的情况:如果用户没有开启回收站,并意外删除了重要文件,事故便发生了。如此一来,可以利用 1Panel 现有的收藏夹功能,实现给这些文件添加一道安全锁。用户只需要把重要文件收藏起来,就能避免它们被误删。
因此我建议为现有的“收藏夹”功能增加一条保护策略,使以下类型的删除操作不能完成:
- 当前目录/文件被标记为收藏。
- 存在被标记为收藏的父级目录。
- 子目录中存在被标记为收藏的目录/文件。
可以让此类删除操作被拒绝时向用户发送提示“无法删除收藏夹中的文件或目录,请先将其取消收藏。”。(以下为参考示意图)
Please describe the solution you suggest
No response
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.