permissions: removes global access to bus from MakeUserAdmin.

This commit is contained in:
Leonard Gram
2019-03-14 12:18:07 +01:00
parent adf0390b2c
commit a615b78f8a
4 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ func (hs *HTTPServer) CreateFolder(c *m.ReqContext, cmd m.CreateFolderCommand) R
}
if hs.Cfg.EditorsCanAdmin {
if err := dashboards.MakeUserAdmin(c.OrgId, c.SignedInUser.UserId, cmd.Result.Id, true); err != nil {
if err := dashboards.MakeUserAdmin(hs.Bus, c.OrgId, c.SignedInUser.UserId, cmd.Result.Id, true); err != nil {
hs.log.Error("Could not make user admin", "folder", cmd.Result.Title, "user", c.SignedInUser.UserId, "error", err)
return Error(500, "Failed to make user admin of folder", err)
}