add back-end flags to #19

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

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
}