Skip to content

[Feature] 收藏夹文件/目录防误删机制 #13072

@BredyAK

Description

@BredyAK

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions