add back-end flags to #19

This commit is contained in:
Henrique Dias committed 2016-08-21 19:21:09 +01:00
1 parent c1290b149a
commit 87de0ae1be
4 files changed
+34 -23

No files matched your search

-22
View File
@@ -170,17 +170,6 @@ func (i *Info) serveSingleFile(w http.ResponseWriter, r *http.Request, c *config
},
}
// Set the current User
user, _, ok := r.BasicAuth()
if !ok {
page.Info.User = c.UserConfig
}
if _, ok := c.Users[user]; ok {
page.Info.User = c.Users[user]
}
if CanBeEdited(i.Name) {
editor, err := i.GetEditor()
@@ -261,17 +250,6 @@ func (i *Info) serveListing(w http.ResponseWriter, r *http.Request, c *config.Co
},
}
// Set the current User
user, _, ok := r.BasicAuth()
if !ok {
page.Info.User = c.UserConfig
}
if _, ok := c.Users[user]; ok {
page.Info.User = c.Users[user]
}
if r.Header.Get("Minimal") == "true" {
page.Minimal = true
}