permissions: refactor.

This commit is contained in:
Leonard Gram
2019-03-19 14:01:19 +01:00
parent b796027bc6
commit 9f8e43916d
3 changed files with 3 additions and 17 deletions
+1 -2
View File
@@ -62,8 +62,7 @@ func (hs *HTTPServer) CreateFolder(c *m.ReqContext, cmd m.CreateFolderCommand) R
}
if hs.Cfg.EditorsCanAdmin {
aclService := dashboards.NewAclService()
if err := aclService.MakeUserAdmin(c.OrgId, c.SignedInUser.UserId, cmd.Result.Id, true); err != nil {
if err := dashboards.MakeUserAdmin(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)
}