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:
@@ -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, "")
|
||||
|
||||
Reference in New Issue
Block a user