This commit is contained in:
Henrique Dias committed 2017-09-11 09:46:17 +01:00
1 parent 879ad7b518
commit f658394dd7
3 files changed
+9 -3

No files matched your search

+7
View File
@@ -268,6 +268,13 @@ func usersPutHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int
return http.StatusBadRequest, err
}
// If we're updating the default user. Only for NoAuth
// implementations. Used to change the viewMode.
if id == 0 && c.NoAuth {
c.DefaultUser.ViewMode = u.ViewMode
return http.StatusOK, nil
}
// Updates the CSS and locale.
if which == "partial" {
c.User.CSS = u.CSS