diff --git a/packages/nc-gui/components/account/UserList.vue b/packages/nc-gui/components/account/UserList.vue
index b73f89c4d8..ed11b4f39c 100644
--- a/packages/nc-gui/components/account/UserList.vue
+++ b/packages/nc-gui/components/account/UserList.vue
@@ -236,7 +236,7 @@ const openDeleteModal = (user: UserType) => {
>
diff --git a/packages/nc-gui/components/project/AccessSettings.vue b/packages/nc-gui/components/project/AccessSettings.vue
index cfcd2b44e1..cb0f0516de 100644
--- a/packages/nc-gui/components/project/AccessSettings.vue
+++ b/packages/nc-gui/components/project/AccessSettings.vue
@@ -30,6 +30,7 @@ interface Collaborators {
base_roles: Roles
workspace_roles: WorkspaceUserRoles
created_at: string
+ display_name: string | null
}
const collaborators = ref
([])
const totalCollaborators = ref(0)
@@ -40,7 +41,11 @@ const isSearching = ref(false)
const accessibleRoles = ref<(typeof ProjectRoles)[keyof typeof ProjectRoles][]>([])
const filteredCollaborators = computed(() =>
- collaborators.value.filter((collab) => collab.email.toLowerCase().includes(userSearchText.value.toLowerCase())),
+ collaborators.value.filter((collab) =>
+ collab.display_name
+ ? collab.display_name.toLowerCase().includes(userSearchText.value.toLowerCase())
+ : collab.email.toLowerCase().includes(userSearchText.value.toLowerCase()),
+ ),
)
const sortedCollaborators = computed(() => {
@@ -183,7 +188,7 @@ onMounted(async () => {
- {{ collab.email }}
+ {{ collab.display_name || collab.email }}
diff --git a/packages/nc-gui/components/workspace/CollaboratorsList.vue b/packages/nc-gui/components/workspace/CollaboratorsList.vue
index 5492ec69b2..c841c3497e 100644
--- a/packages/nc-gui/components/workspace/CollaboratorsList.vue
+++ b/packages/nc-gui/components/workspace/CollaboratorsList.vue
@@ -19,7 +19,11 @@ const filterCollaborators = computed(() => {
if (!collaborators.value) return []
- return collaborators.value.filter((collab) => collab.email!.includes(userSearchText.value))
+ return collaborators.value.filter((collab) =>
+ collab.display_name
+ ? collab.display_name.toLowerCase().includes(userSearchText.value.toLowerCase())
+ : collab.email.toLowerCase().includes(userSearchText.value.toLowerCase()),
+ )
})
const sortedCollaborators = computed(() => {
@@ -97,7 +101,7 @@ onMounted(async () => {
- {{ collab.email }}
+ {{ collab.display_name || collab.email }}
diff --git a/packages/nocodb/src/models/User.ts b/packages/nocodb/src/models/User.ts
index c8402c7348..a03e5c736e 100644
--- a/packages/nocodb/src/models/User.ts
+++ b/packages/nocodb/src/models/User.ts
@@ -217,6 +217,7 @@ export default class User implements UserType {
`${MetaTable.USERS}.created_at`,
`${MetaTable.USERS}.updated_at`,
`${MetaTable.USERS}.roles`,
+ `${MetaTable.USERS}.display_name`,
)
.select(
ncMeta