From a797126aab74448ec51ae14913a21bc9e52b4e37 Mon Sep 17 00:00:00 2001 From: Jan Horstmann Date: Mon, 12 Dec 2022 17:42:04 +0100 Subject: [PATCH] Responder type escalation in alert policies This commit allows to set responder type `escalation` to alert policies. Closes: #118 --- policy/request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/policy/request.go b/policy/request.go index f224965..50cff7c 100644 --- a/policy/request.go +++ b/policy/request.go @@ -681,8 +681,8 @@ func ValidateDelayAction(action DelayAction) error { func ValidateResponders(responders *[]alert.Responder) error { for _, responder := range *responders { - if responder.Type != alert.UserResponder && responder.Type != alert.TeamResponder { - return errors.New("responder type for alert policy should be one of team or user") + if responder.Type != alert.UserResponder && responder.Type != alert.TeamResponder && responder.Type != alert.EscalationResponder { + return errors.New("responder type for alert policy should be one of team, user or escalation") } if responder.Id == "" { return errors.New("responder id should be provided")