Alerting: Change create/update permissions for silences (#78920)
* Change create/update permissions for silences * Add comment
This commit is contained in:
@@ -19,7 +19,7 @@ exports[`alertmanager abilities should report Create / Update / Delete actions a
|
||||
false,
|
||||
],
|
||||
"create-silence": [
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
],
|
||||
"decrypt-secrets": [
|
||||
@@ -71,7 +71,7 @@ exports[`alertmanager abilities should report Create / Update / Delete actions a
|
||||
false,
|
||||
],
|
||||
"update-silence": [
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
],
|
||||
"view-contact-point": [
|
||||
|
||||
@@ -226,9 +226,10 @@ export function useAllAlertmanagerAbilities(): Abilities<AlertmanagerAction> {
|
||||
notificationsPermissions.provisioning.readSecrets
|
||||
),
|
||||
// -- 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.UpdateSilence]: toAbility(hasConfigurationAPI, instancePermissions.update),
|
||||
[AlertmanagerAction.UpdateSilence]: toAbility(AlwaysSupported, instancePermissions.update),
|
||||
// -- mute timtings --
|
||||
[AlertmanagerAction.CreateMuteTiming]: toAbility(hasConfigurationAPI, notificationsPermissions.create),
|
||||
[AlertmanagerAction.ViewMuteTiming]: toAbility(AlwaysSupported, notificationsPermissions.read),
|
||||
|
||||
Reference in New Issue
Block a user