1Panel-dev / 1Panel-dev/1Panel

[Feature] Accidental deletion prevention mechanism for favorite files/directories

Open
#13,072 1 comment 0 reactions 1 assignee View on GitHub

@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 现有的收藏夹功能,实现给这些文件添加一道安全锁。用户只需要把重要文件收藏起来,就能避免它们被误删。

Image Image

因此我建议为现有的“收藏夹”功能增加一条保护策略,使以下类型的删除操作不能完成:

  • 当前目录/文件被标记为收藏。
  • 存在被标记为收藏的父级目录。
  • 子目录中存在被标记为收藏的目录/文件。

可以让此类删除操作被拒绝时向用户发送提示“无法删除收藏夹中的文件或目录,请先将其取消收藏。”。(以下为参考示意图)

Image
Please describe the solution you suggest

No response

Additional Information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.