mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-09 19:53:41 +00:00
fix: improve login name display after user selection (#1493)
This commit is contained in:
parent
50bc317d27
commit
5c5918e545
@ -244,7 +244,11 @@ func (repo *AuthRequestRepo) SelectUser(ctx context.Context, id, userID, userAge
|
|||||||
if request.RequestedOrgID != "" && request.RequestedOrgID != user.ResourceOwner {
|
if request.RequestedOrgID != "" && request.RequestedOrgID != user.ResourceOwner {
|
||||||
return errors.ThrowPreconditionFailed(nil, "EVENT-fJe2a", "Errors.User.NotAllowedOrg")
|
return errors.ThrowPreconditionFailed(nil, "EVENT-fJe2a", "Errors.User.NotAllowedOrg")
|
||||||
}
|
}
|
||||||
request.SetUserInfo(user.ID, user.UserName, user.PreferredLoginName, user.DisplayName, user.ResourceOwner)
|
username := user.UserName
|
||||||
|
if request.RequestedOrgID == "" {
|
||||||
|
username = user.PreferredLoginName
|
||||||
|
}
|
||||||
|
request.SetUserInfo(user.ID, username, user.PreferredLoginName, user.DisplayName, user.ResourceOwner)
|
||||||
return repo.AuthRequests.UpdateAuthRequest(ctx, request)
|
return repo.AuthRequests.UpdateAuthRequest(ctx, request)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user