mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
fix(cloudid): support custom saml user name (#15511)
This commit is contained in:
@@ -128,10 +128,14 @@ func (manager *SSamluserManager) ValidateCreateData(ctx context.Context, userCre
|
||||
return input, errors.Wrapf(err, "FetchUserById")
|
||||
}
|
||||
input.OwnerId = user.Id
|
||||
input.Name = user.Name
|
||||
if len(input.Name) == 0 {
|
||||
input.Name = user.Name
|
||||
}
|
||||
} else {
|
||||
input.OwnerId = userCred.GetUserId()
|
||||
input.Name = userCred.GetUserName()
|
||||
if len(input.Name) == 0 {
|
||||
input.Name = userCred.GetUserName()
|
||||
}
|
||||
}
|
||||
_group, err := validators.ValidateModel(userCred, CloudgroupManager, &input.CloudgroupId)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user