Alerting: Provisioning API - Notification Policies (#46755)
* Base-line API for provisioning notification policies * Wire API up, some simple tests * Return provenance status through API * Fix missing call * Transactions * Clarity in package dependencies * Unify receivers in definitions * Fix issue introduced by receiver change * Drop unused internal test implementation * FGAC hooks for provisioning routes * Polish, swap names * Asserting on number of exposed routes * Don't bubble up updated object * Integrate with new concurrency token feature in store * Back out duplicated changes * Remove redundant tests * Regenerate and create unit tests for API layer * Integration tests for auth * Address linter errors * Put route behind toggle * Use alternative store API and fix feature toggle in tests * Fixes, polish * Fix whitespace * Re-kick drone * Rename services to provisioning
This commit is contained in:
@@ -179,6 +179,13 @@ func (api *API) authorize(method, path string) web.Handler {
|
||||
http.MethodPost + "/api/v1/ngalert/admin_config",
|
||||
http.MethodGet + "/api/v1/ngalert/alertmanagers":
|
||||
return middleware.ReqOrgAdmin
|
||||
|
||||
// Grafana-only Provisioning Read Paths
|
||||
case http.MethodGet + "/api/provisioning/policies":
|
||||
return middleware.ReqSignedIn
|
||||
|
||||
case http.MethodPost + "/api/provisioning/policies":
|
||||
return middleware.ReqEditorRole
|
||||
}
|
||||
|
||||
if eval != nil {
|
||||
|
||||
Reference in New Issue
Block a user