feat: revert supporting for forbidden permission (#352)

This commit is contained in:
sigoden
2024-01-17 11:31:26 +08:00
committed by GitHub
parent 3354b1face
commit 95eb648411
4 changed files with 14 additions and 42 deletions

View File

@@ -375,7 +375,7 @@ impl Server {
"PROPFIND" => {
if is_dir {
let access_paths =
if access_paths.perm().inherit() && authorization.is_none() {
if access_paths.perm().indexonly() && authorization.is_none() {
// see https://github.com/sigoden/dufs/issues/229
AccessPaths::new(AccessPerm::ReadOnly)
} else {
@@ -1230,7 +1230,7 @@ impl Server {
access_paths: AccessPaths,
) -> Result<Vec<PathItem>> {
let mut paths: Vec<PathItem> = vec![];
if access_paths.perm().inherit() {
if access_paths.perm().indexonly() {
for name in access_paths.child_names() {
let entry_path = entry_path.join(name);
self.add_pathitem(&mut paths, base_path, &entry_path).await;