Alerting: Verify receiver permission read on rule create/update (#94286)

* Alerting: Verify receiver permission read on rule create/update
This commit is contained in:
Matthew Jacobson
2024-10-04 23:52:38 +03:00
committed by GitHub
parent 27c7e33217
commit 099055e8a5
5 changed files with 149 additions and 40 deletions
@@ -35,6 +35,10 @@ type NotificationSettings struct {
MuteTimeIntervals []string `json:"mute_time_intervals,omitempty"`
}
func (s *NotificationSettings) GetUID() string {
return NameToUid(s.Receiver)
}
// NormalizedGroupBy returns a consistent and ordered GroupBy.
// - If the GroupBy is empty, it returns nil so that the parent group can be inherited.
// - If the GroupBy contains the special label '...', it returns only '...'.