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
+15
View File
@@ -72,3 +72,18 @@ func updateOrgHelper(cmd m.UpdateOrgCommand) Response {
return ApiSuccess("Organization updated")
}
func SearchOrgs(c *middleware.Context) Response {
query := m.SearchOrgsQuery{
Query: c.Query("query"),
Name: c.Query("name"),
Page: 0,
Limit: 1000,
}
if err := bus.Dispatch(&query); err != nil {
return ApiError(500, "Failed to search orgs", err)
}
return Json(200, query.Result)
}