mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
chore(console): remove first and lastName fallback from user (#5629)
* chore(console): remove first and lastName fallback from user * use display name and ensure it's set without required name fields * add user type to user grant and memberships responses * contributor, members * fix avatar display checks --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/database"
|
||||
"github.com/zitadel/zitadel/internal/domain"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -26,12 +27,15 @@ var (
|
||||
", projections.users8_humans.display_name" +
|
||||
", projections.users8_machines.name" +
|
||||
", projections.users8_humans.avatar_key" +
|
||||
", projections.users8.type" +
|
||||
", COUNT(*) OVER () " +
|
||||
"FROM projections.instance_members3 AS members " +
|
||||
"LEFT JOIN projections.users8_humans " +
|
||||
"ON members.user_id = projections.users8_humans.user_id AND members.instance_id = projections.users8_humans.instance_id " +
|
||||
"LEFT JOIN projections.users8_machines " +
|
||||
"ON members.user_id = projections.users8_machines.user_id AND members.instance_id = projections.users8_machines.instance_id " +
|
||||
"LEFT JOIN projections.users8 " +
|
||||
"ON members.user_id = projections.users8.id AND members.instance_id = projections.users8.instance_id " +
|
||||
"LEFT JOIN projections.login_names2 " +
|
||||
"ON members.user_id = projections.login_names2.user_id AND members.instance_id = projections.login_names2.instance_id " +
|
||||
"AS OF SYSTEM TIME '-1 ms' " +
|
||||
@@ -50,6 +54,7 @@ var (
|
||||
"display_name",
|
||||
"name",
|
||||
"avatar_key",
|
||||
"type",
|
||||
"count",
|
||||
}
|
||||
)
|
||||
@@ -101,6 +106,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
"display name",
|
||||
nil,
|
||||
nil,
|
||||
domain.UserTypeHuman,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -123,6 +129,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
LastName: "last-name",
|
||||
DisplayName: "display name",
|
||||
AvatarURL: "",
|
||||
UserType: domain.UserTypeHuman,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -149,6 +156,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
nil,
|
||||
"machine-name",
|
||||
nil,
|
||||
domain.UserTypeMachine,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -171,6 +179,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
LastName: "",
|
||||
DisplayName: "machine-name",
|
||||
AvatarURL: "",
|
||||
UserType: domain.UserTypeMachine,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -197,6 +206,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
"display name",
|
||||
nil,
|
||||
nil,
|
||||
domain.UserTypeHuman,
|
||||
},
|
||||
{
|
||||
testNow,
|
||||
@@ -212,6 +222,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
nil,
|
||||
"machine-name",
|
||||
nil,
|
||||
domain.UserTypeMachine,
|
||||
},
|
||||
},
|
||||
),
|
||||
@@ -234,6 +245,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
LastName: "last-name",
|
||||
DisplayName: "display name",
|
||||
AvatarURL: "",
|
||||
UserType: domain.UserTypeHuman,
|
||||
},
|
||||
{
|
||||
CreationDate: testNow,
|
||||
@@ -248,6 +260,7 @@ func Test_IAMMemberPrepares(t *testing.T) {
|
||||
LastName: "",
|
||||
DisplayName: "machine-name",
|
||||
AvatarURL: "",
|
||||
UserType: domain.UserTypeMachine,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user