Bump provisioning to admin-only in lieu of dedicated RBAC permissions (#50366)

This commit is contained in:
Alexander Weaver
2022-06-07 17:26:48 -05:00
committed by GitHub
parent 0cde283505
commit 28a47b56d2
2 changed files with 22 additions and 22 deletions

View File

@@ -186,7 +186,7 @@ func (api *API) authorize(method, path string) web.Handler {
http.MethodGet + "/api/v1/provisioning/mute-timings",
http.MethodGet + "/api/v1/provisioning/mute-timings/{name}",
http.MethodGet + "/api/v1/provisioning/alert-rules/{UID}":
return middleware.ReqSignedIn
return middleware.ReqOrgAdmin
case http.MethodPut + "/api/v1/provisioning/policies",
http.MethodPost + "/api/v1/provisioning/contact-points",
@@ -201,7 +201,7 @@ func (api *API) authorize(method, path string) web.Handler {
http.MethodPut + "/api/v1/provisioning/alert-rules/{UID}",
http.MethodDelete + "/api/v1/provisioning/alert-rules/{UID}",
http.MethodPut + "/api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}":
return middleware.ReqEditorRole
return middleware.ReqOrgAdmin
}
if eval != nil {