fix: site-replication will reset group status when add user (#19594)

This commit is contained in:
jiuker
2024-04-24 23:54:24 +08:00
committed by GitHub
parent 77d5331e85
commit df93ff92ba
2 changed files with 38 additions and 1 deletions

View File

@@ -1325,7 +1325,7 @@ func (c *SiteReplicationSys) PeerGroupInfoChangeHandler(ctx context.Context, cha
} else {
_, err = globalIAMSys.AddUsersToGroup(ctx, updReq.Group, updReq.Members)
}
if err == nil && updReq.Status != madmin.GroupEnabled {
if err == nil && updReq.Status != "" {
_, err = globalIAMSys.SetGroupStatus(ctx, updReq.Group, updReq.Status == madmin.GroupEnabled)
}
}