subdir perms: allow empty perms

empty perms will allow nothing on the specified subdir.

Non empty permissions for the "/" dir are still required.

Fixes #70
This commit is contained in:
Nicola Murino
2020-02-10 19:28:35 +01:00
parent 7bfe0ddf80
commit 8eff2df39c
5 changed files with 39 additions and 4 deletions

View File

@@ -200,7 +200,7 @@ func getUserPermissionsFromPostFields(r *http.Request) map[string][]string {
perms = append(perms, cleanedPerm)
}
}
if len(dir) > 0 && len(perms) > 0 {
if len(dir) > 0 {
permissions[dir] = perms
}
}