diff --git a/server/common/check.go b/server/common/check.go index d0fa6b94..63cd72a4 100644 --- a/server/common/check.go +++ b/server/common/check.go @@ -17,7 +17,7 @@ func CanWrite(meta *model.Meta, path string) bool { func CanAccess(user *model.User, meta *model.Meta, reqPath string, password string) bool { // if the reqPath is in hide (only can check the nearest meta) and user can't see hides, can't access - if meta != nil && !user.CanSeeHides() { + if meta != nil && !user.CanSeeHides() && meta.Hide != "" { for _, hide := range strings.Split(meta.Hide, "\n") { re := regexp.MustCompile(hide) if re.MatchString(reqPath[len(meta.Path):]) {