mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #10460 from rainzm/notify/robot1
fix(notify): be compatible with robots and webhooks
This commit is contained in:
@@ -87,6 +87,9 @@ func (nm *SNotificationManager) ValidateCreateData(ctx context.Context, userCred
|
||||
if !userCred.IsAllow(rbacutils.ScopeSystem, api.SERVICE_TYPE, nm.KeywordPlural(), policy.PolicyActionPerform, SendByContact) {
|
||||
return input, httperrors.NewForbiddenError("can't send notification by contact, need receiver")
|
||||
}
|
||||
if len(input.Contacts) == 0 {
|
||||
input.Contacts = []string{""}
|
||||
}
|
||||
}
|
||||
|
||||
// check contact type enabled
|
||||
|
||||
Reference in New Issue
Block a user