Skip to content

Commit

Permalink
[v9.5.x] Require alert.notifications:write permissions to test receiv…
Browse files Browse the repository at this point in the history
…ers and templates (#867)

Require alert.notifications:write permissions to test receivers and templates (#865)

(cherry picked from commit 3c21ab70075256d4ba8e4fbfdcb15f5a394161fa)
  • Loading branch information
grobinson-grafana authored and zerok committed Jun 6, 2023
1 parent 342ad7f commit 9db334a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/services/ngalert/api/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (api *API) authorize(method, path string) web.Handler {
eval = ac.EvalPermission(ac.ActionAlertingNotificationsRead)
case http.MethodPost + "/api/alertmanager/grafana/config/api/v1/receivers/test":
fallback = middleware.ReqEditorRole
eval = ac.EvalPermission(ac.ActionAlertingNotificationsRead)
eval = ac.EvalPermission(ac.ActionAlertingNotificationsWrite)

// External Alertmanager Paths
case http.MethodDelete + "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts":
Expand Down

0 comments on commit 9db334a

Please sign in to comment.