Worked on user administration page, a grafana server admin can now add and edit organization roles for any user, #2014

This commit is contained in:
Torkel Ödegaard
2015-05-19 11:47:14 +02:00
parent 788e7fd36d
commit a8aab0cb2b
12 changed files with 169 additions and 47 deletions

View File

@ -142,3 +142,13 @@ func ChangeUserPassword(c *middleware.Context, cmd m.ChangeUserPasswordCommand)
c.JsonOK("User password changed")
}
// GET /api/users
func SearchUsers(c *middleware.Context) Response {
query := m.SearchUsersQuery{Query: "", Page: 0, Limit: 1000}
if err := bus.Dispatch(&query); err != nil {
return ApiError(500, "Failed to fetch users", err)
}
return Json(200, query.Result)
}