From b2a45cb98ef00ea621a95a9c6bb4575c4caea95d Mon Sep 17 00:00:00 2001 From: rainzm Date: Wed, 13 Oct 2021 16:43:21 +0800 Subject: [PATCH] fix(notify): support modify rolescope when change subscriber --- pkg/notify/models/subscriber.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/notify/models/subscriber.go b/pkg/notify/models/subscriber.go index be2b94185e..89d9932f0a 100644 --- a/pkg/notify/models/subscriber.go +++ b/pkg/notify/models/subscriber.go @@ -284,6 +284,9 @@ func (s *SSubscriber) PerformChange(ctx context.Context, userCred mcclient.Token case api.SUBSCRIBER_TYPE_ROLE: _, err := db.Update(s, func() error { s.Identification = input.Role + if input.RoleScope != "" { + s.RoleScope = input.RoleScope + } return nil }) if err != nil {