Alerting: Fix contact point export 500 error and notifications/receivers missing settings (#90342)

* Regression test

* Fix 500 error when exporting redacted receivers

* Fix tests to check permissions
This commit is contained in:
Matthew Jacobson
2024-07-12 11:42:22 -04:00
committed by GitHub
parent 5d8ca38b9b
commit b7767c79e7
7 changed files with 130 additions and 61 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ func (srv *ProvisioningSrv) RouteGetContactPoints(c *contextmodel.ReqContext) re
Name: c.Query("name"),
OrgID: c.SignedInUser.GetOrgID(),
}
cps, err := srv.contactPointService.GetContactPoints(c.Req.Context(), q, nil)
cps, err := srv.contactPointService.GetContactPoints(c.Req.Context(), q, c.SignedInUser)
if err != nil {
if errors.Is(err, provisioning.ErrPermissionDenied) {
return ErrResp(http.StatusForbidden, err, "")