Merge branch 'master' into develop

This commit is contained in:
Torkel Ödegaard
2017-08-14 10:30:36 +02:00
169 changed files with 6289 additions and 4746 deletions
+6 -1
View File
@@ -234,9 +234,14 @@ func (hs *HttpServer) registerRoutes() {
// Dashboard
r.Group("/dashboards", func() {
r.Combo("/db/:slug").Get(wrap(GetDashboard)).Delete(wrap(DeleteDashboard))
r.Get("/db/:slug", wrap(GetDashboard))
r.Delete("/db/:slug", wrap(DeleteDashboard))
r.Post("/db", bind(m.SaveDashboardCommand{}), wrap(PostDashboard))
r.Get("/id/:dashboardId/versions", wrap(GetDashboardVersions))
r.Get("/id/:dashboardId/versions/:id", wrap(GetDashboardVersion))
r.Post("/id/:dashboardId/restore", reqEditorRole, bind(dtos.RestoreDashboardVersionCommand{}), wrap(RestoreDashboardVersion))
r.Post("/calculate-diff", bind(dtos.CalculateDiffOptions{}), wrap(CalculateDashboardDiff))
r.Get("/home", wrap(GetHomeDashboard))
r.Get("/tags", GetDashboardTags)
+1 -1
View File
@@ -31,7 +31,7 @@ type AdminUpdateUserPasswordForm struct {
}
type AdminUpdateUserPermissionsForm struct {
IsGrafanaAdmin bool `json:"isGrafanaAdmin" binding:"Required"`
IsGrafanaAdmin bool `json:"isGrafanaAdmin"`
}
type AdminUserListItem struct {
+1
View File
@@ -143,6 +143,7 @@ func loginUserWithUser(user *m.User, c *middleware.Context) {
c.SetSuperSecureCookie(user.Rands+user.Password, setting.CookieRememberName, user.Login, days, setting.AppSubUrl+"/")
}
c.Session.RegenerateId(c)
c.Session.Set(middleware.SESS_KEY_USERID, user.Id)
}