elFinder - 根文件夹和子文件夹的单独访问控制


elFinder - Separate Access Control For Root Folder and Subfolders

我有一个非常沉重的问题,但是如何禁用删除/重命名root中的第一级文件夹?

例如,如果我的根路径是 path/to/files,

那么我希望阻止用户在根路径/to/files/first_level_folder之后删除/重命名第一级文件夹,但用户应该能够在路径/to/files/first_level_folder/子文件夹内拥有完全控制权。

我尝试做:

    'attributes' => array(
                        array(
                                'pattern' => '/no_edit_path/', 
                                'read'    => true,
                                'write'   => false,
                                'locked'  => true,
                                'hidden'  => false
                            ),
                        array(
                                'pattern' => '/no_edit_path/*', 
                                'read'    => true,
                                'write'   => true,
                                'locked'  => false,
                                'hidden'  => false
                            ),
                        )

有预期的效果,因为用户不能对第一级文件夹进行调节,但随后我无法添加子文件夹和文件......有解决方法吗?

谢谢你的时间。

在尝试了更多事情之后,我找到了解决方案。也许将来会帮助某人。

  'attributes' => array(
                        array(
                                'pattern' => '/no_edit_path$/', 
                                'read'    => true,
                                'write'   => false,
                                'locked'  => true,
                                'hidden'  => false
                            ),
                        array(
                                'pattern' => '/no_edit_path/.*/', 
                                'read'    => true,
                                'write'   => true,
                                'locked'  => false,
                                'hidden'  => false
                            ),
                        )