add comments and update config; close #23

This commit is contained in:
Henrique Dias
2016-08-22 12:09:18 +01:00
parent e606af4eae
commit 1df11145a8
3 changed files with 81 additions and 101 deletions

View File

@@ -18,9 +18,7 @@ type User struct {
Rules []*Rule `json:"-"` // Access rules
}
// REVIEW: USE USER ROOT
// Allowed is
// Allowed checks if the user has permission to access a directory/file
func (u User) Allowed(url string) bool {
var rule *Rule
i := len(u.Rules) - 1