folder: uses service to make user admin of created folder.

This commit is contained in:
Leonard Gram
2019-03-19 13:57:21 +01:00
parent c8c004095c
commit da3dcd1918
2 changed files with 5 additions and 40 deletions
+5
View File
@@ -61,6 +61,11 @@ func (hs *HTTPServer) CreateFolder(c *m.ReqContext, cmd m.CreateFolderCommand) R
return toFolderError(err)
}
if hs.Cfg.EditorsCanOwn {
aclService := dashboards.NewAclService()
aclService.MakeUserAdmin(c.OrgId, c.SignedInUser.UserId, cmd.Result.Id)
}
g := guardian.New(cmd.Result.Id, c.OrgId, c.SignedInUser)
return JSON(200, toFolderDto(g, cmd.Result))
}