mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Change create/update permissions for silences (#78920)
* Change create/update permissions for silences * Add comment
This commit is contained in:
parent
b40e61d935
commit
148e1c1588
@ -19,7 +19,7 @@ exports[`alertmanager abilities should report Create / Update / Delete actions a
|
|||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
"create-silence": [
|
"create-silence": [
|
||||||
false,
|
true,
|
||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
"decrypt-secrets": [
|
"decrypt-secrets": [
|
||||||
@ -71,7 +71,7 @@ exports[`alertmanager abilities should report Create / Update / Delete actions a
|
|||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
"update-silence": [
|
"update-silence": [
|
||||||
false,
|
true,
|
||||||
false,
|
false,
|
||||||
],
|
],
|
||||||
"view-contact-point": [
|
"view-contact-point": [
|
||||||
|
@ -226,9 +226,10 @@ export function useAllAlertmanagerAbilities(): Abilities<AlertmanagerAction> {
|
|||||||
notificationsPermissions.provisioning.readSecrets
|
notificationsPermissions.provisioning.readSecrets
|
||||||
),
|
),
|
||||||
// -- silences --
|
// -- silences --
|
||||||
[AlertmanagerAction.CreateSilence]: toAbility(hasConfigurationAPI, instancePermissions.create),
|
// for now, all supported Alertmanager flavors have API endpoints for managing silences
|
||||||
|
[AlertmanagerAction.CreateSilence]: toAbility(AlwaysSupported, instancePermissions.create),
|
||||||
[AlertmanagerAction.ViewSilence]: toAbility(AlwaysSupported, instancePermissions.read),
|
[AlertmanagerAction.ViewSilence]: toAbility(AlwaysSupported, instancePermissions.read),
|
||||||
[AlertmanagerAction.UpdateSilence]: toAbility(hasConfigurationAPI, instancePermissions.update),
|
[AlertmanagerAction.UpdateSilence]: toAbility(AlwaysSupported, instancePermissions.update),
|
||||||
// -- mute timtings --
|
// -- mute timtings --
|
||||||
[AlertmanagerAction.CreateMuteTiming]: toAbility(hasConfigurationAPI, notificationsPermissions.create),
|
[AlertmanagerAction.CreateMuteTiming]: toAbility(hasConfigurationAPI, notificationsPermissions.create),
|
||||||
[AlertmanagerAction.ViewMuteTiming]: toAbility(AlwaysSupported, notificationsPermissions.read),
|
[AlertmanagerAction.ViewMuteTiming]: toAbility(AlwaysSupported, notificationsPermissions.read),
|
||||||
|
Loading…
Reference in New Issue
Block a user