mirror of https://github.com/grafana/grafana.git
Alerting: Use correct permission scope for external AM updates (#50159)
Co-authored-by: konrad147 <konrad.lalik@grafana.com>
This commit is contained in:
parent
7a56097b13
commit
e6ceee501f
|
|
@ -167,7 +167,7 @@ func (api *API) authorize(method, path string) web.Handler {
|
|||
case http.MethodGet + "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts":
|
||||
eval = ac.EvalPermission(ac.ActionAlertingNotificationsExternalRead, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
|
||||
case http.MethodPost + "/api/alertmanager/{DatasourceUID}/config/api/v1/alerts":
|
||||
eval = ac.EvalPermission(ac.ActionAlertingNotificationsExternalWrite, datasources.ScopeProvider.GetResourceScope(ac.Parameter(":DatasourceID")))
|
||||
eval = ac.EvalPermission(ac.ActionAlertingNotificationsExternalWrite, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
|
||||
case http.MethodPost + "/api/alertmanager/{DatasourceUID}/config/api/v1/receivers/test":
|
||||
eval = ac.EvalPermission(ac.ActionAlertingNotificationsExternalRead, datasources.ScopeProvider.GetResourceScopeUID(ac.Parameter(":DatasourceUID")))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue