fix: replace user displayname with annotation (#6396)

Signed-off-by: peng wu <2030047311@qq.com>
Co-authored-by: peng wu <2030047311@qq.com>
This commit is contained in:
KubeSphere CI Bot
2025-03-06 18:04:43 +08:00
committed by GitHub
parent c0bf77e541
commit e48875411d

View File

@@ -145,7 +145,7 @@ func (h *handler) CreateUser(req *restful.Request, resp *restful.Response) {
return
}
if user.Annotations == nil {
user.Labels = make(map[string]string)
user.Annotations = make(map[string]string)
}
user.Annotations[fmt.Sprintf("%s.%s", iamv1beta1.IdentityProviderAnnotation, extra[iamv1beta1.ExtraIdentityProvider][0])] = extra[iamv1beta1.ExtraUID][0]
delete(user.Annotations, iamv1beta1.GlobalRoleAnnotation)