Skip to content

Commit

Permalink
style: try to remove withUser for GET /api/resources (withUser removi…
Browse files Browse the repository at this point in the history
…ng step-1)
  • Loading branch information
lovehunter9 committed Feb 27, 2025
1 parent be54af5 commit a6ad610
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/backend/http/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (

"github.com/tomasen/realip"

"github.com/filebrowser/filebrowser/v2/rules"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/users"
Expand All @@ -26,9 +25,9 @@ type data struct {

// Check implements rules.Checker.
func (d *data) Check(path string) bool {
if d.user.HideDotfiles && rules.MatchHidden(path) {
return false
}
//if d.user.HideDotfiles && rules.MatchHidden(path) {
// return false
//}

allow := true
for _, rule := range d.settings.Rules {
Expand All @@ -37,11 +36,11 @@ func (d *data) Check(path string) bool {
}
}

for _, rule := range d.user.Rules {
if rule.Matches(path) {
allow = rule.Allow
}
}
//for _, rule := range d.user.Rules {
// if rule.Matches(path) {
// allow = rule.Allow
// }
//}

return allow
}
Expand Down

0 comments on commit a6ad610

Please sign in to comment.