mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: select account styling (#2970)
* fix: account selection * fix: styling of disabled accounts * fix: styling of disabled accounts * fix: don't show disabled accounts * fix: remove unused css * fix: remove unused css * fix: remove unused css * fix: don't show non selectable users * fix: test
This commit is contained in:
parent
478beded9f
commit
d03cab22c0
@ -818,17 +818,19 @@ func (repo *AuthRequestRepo) usersForUserSelection(request *domain.AuthRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
users := make([]domain.UserSelection, len(userSessions))
|
||||
for i, session := range userSessions {
|
||||
users[i] = domain.UserSelection{
|
||||
UserID: session.UserID,
|
||||
DisplayName: session.DisplayName,
|
||||
UserName: session.UserName,
|
||||
LoginName: session.LoginName,
|
||||
ResourceOwner: session.ResourceOwner,
|
||||
AvatarKey: session.AvatarKey,
|
||||
UserSessionState: model.UserSessionStateToDomain(session.State),
|
||||
SelectionPossible: request.RequestedOrgID == "" || request.RequestedOrgID == session.ResourceOwner,
|
||||
users := make([]domain.UserSelection, 0)
|
||||
for _, session := range userSessions {
|
||||
if request.RequestedOrgID == "" || request.RequestedOrgID == session.ResourceOwner {
|
||||
users = append(users, domain.UserSelection{
|
||||
UserID: session.UserID,
|
||||
DisplayName: session.DisplayName,
|
||||
UserName: session.UserName,
|
||||
LoginName: session.LoginName,
|
||||
ResourceOwner: session.ResourceOwner,
|
||||
AvatarKey: session.AvatarKey,
|
||||
UserSessionState: model.UserSessionStateToDomain(session.State),
|
||||
SelectionPossible: request.RequestedOrgID == "" || request.RequestedOrgID == session.ResourceOwner,
|
||||
})
|
||||
}
|
||||
}
|
||||
return users, nil
|
||||
|
@ -401,12 +401,6 @@ func TestAuthRequestRepo_nextSteps(t *testing.T) {
|
||||
SelectionPossible: true,
|
||||
ResourceOwner: "orgID1",
|
||||
},
|
||||
{
|
||||
UserID: "id2",
|
||||
LoginName: "loginname2",
|
||||
SelectionPossible: false,
|
||||
ResourceOwner: "orgID2",
|
||||
},
|
||||
},
|
||||
}},
|
||||
nil,
|
||||
|
Loading…
Reference in New Issue
Block a user