fix(notify): support modify rolescope when change subscriber

This commit is contained in:
rainzm
2021-10-13 16:43:21 +08:00
parent 517da1d61b
commit b2a45cb98e
+3
View File
@@ -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 {