Browse Source

fix: update service account parent refs on user rename in embedded IAM

The embedded IAM UpdateUser handler updated group membership but
not service account ParentUser fields, unlike the standalone handler.
pull/8560/head
Chris Lu 18 hours ago
parent
commit
6ef8a3f565
  1. 6
      weed/s3api/s3api_embedded_iam.go

6
weed/s3api/s3api_embedded_iam.go

@ -361,6 +361,12 @@ func (e *EmbeddedIamApi) UpdateUser(s3cfg *iam_pb.S3ApiConfiguration, values url
}
}
}
// Update service account parent references
for _, sa := range s3cfg.ServiceAccounts {
if sa.ParentUser == userName {
sa.ParentUser = newUserName
}
}
return resp, nil
}
}

Loading…
Cancel
Save