WIP: add user group search

This commit is contained in:
Daniel Lee
2017-06-12 15:49:09 +02:00
parent af67aea2a9
commit 233cd7af4a
13 changed files with 337 additions and 19 deletions
+7
View File
@@ -132,6 +132,13 @@ func (hs *HttpServer) registerRoutes() {
r.Post("/:id/using/:orgId", wrap(UpdateUserActiveOrg))
}, reqGrafanaAdmin)
// user group (admin permission required)
r.Group("/user-groups", func() {
r.Get("/search", wrap(SearchUserGroups))
r.Post("/", quota("user-groups"), bind(m.CreateUserGroupCommand{}), wrap(CreateUserGroup))
r.Delete("/:userGroupId", wrap(DeleteUserGroupById))
}, reqGrafanaAdmin)
// org information available to all users.
r.Group("/org", func() {
r.Get("/", wrap(GetOrgCurrent))