mobile bunch of updayes

Former-commit-id: 28552c1940bdc0b97545123038a424d11e7d9c68
This commit is contained in:
Henrique Dias
2017-01-01 22:40:12 +00:00
parent 9d9f02fbc9
commit 7fade4e2c5
8 changed files with 340 additions and 122 deletions

View File

@@ -57,6 +57,11 @@ func GetListing(u *config.User, filePath string, baseURL string) (*Listing, erro
for _, f := range files {
name := f.Name()
allowed := u.Allowed("/" + name)
if !allowed {
continue
}
if f.IsDir() {
name += "/"
@@ -71,7 +76,7 @@ func GetListing(u *config.User, filePath string, baseURL string) (*Listing, erro
i := Info{
FileInfo: f,
URL: url.String(),
UserAllowed: u.Allowed("/" + name),
UserAllowed: allowed,
}
i.RetrieveFileType()