mirror of
https://github.com/goauthentik/authentik
synced 2026-04-25 17:15:26 +02:00
web: reuse user display-name helper
This commit is contained in:
@@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "#common/api/config";
|
||||
|
||||
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||
import { SlottedTemplateResult } from "#elements/types";
|
||||
import { getUserDisplayName } from "#elements/user/utils";
|
||||
|
||||
import {
|
||||
GoogleWorkspaceProviderUser,
|
||||
@@ -75,7 +76,7 @@ export class GoogleWorkspaceProviderUserList extends Table<GoogleWorkspaceProvid
|
||||
}
|
||||
|
||||
protected override rowLabel(item: GoogleWorkspaceProviderUser): string {
|
||||
return item.userObj.name || item.userObj.username;
|
||||
return getUserDisplayName(item.userObj);
|
||||
}
|
||||
|
||||
protected columns: TableColumn[] = [
|
||||
|
||||
@@ -6,6 +6,7 @@ import { DEFAULT_CONFIG } from "#common/api/config";
|
||||
|
||||
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||
import { SlottedTemplateResult } from "#elements/types";
|
||||
import { getUserDisplayName } from "#elements/user/utils";
|
||||
|
||||
import {
|
||||
MicrosoftEntraProviderUser,
|
||||
@@ -75,7 +76,7 @@ export class MicrosoftEntraProviderUserList extends Table<MicrosoftEntraProvider
|
||||
}
|
||||
|
||||
protected override rowLabel(item: MicrosoftEntraProviderUser): string {
|
||||
return item.userObj.name || item.userObj.username;
|
||||
return getUserDisplayName(item.userObj);
|
||||
}
|
||||
|
||||
protected columns: TableColumn[] = [
|
||||
|
||||
@@ -7,6 +7,7 @@ import { DEFAULT_CONFIG } from "#common/api/config";
|
||||
|
||||
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||
import { SlottedTemplateResult } from "#elements/types";
|
||||
import { getUserDisplayName } from "#elements/user/utils";
|
||||
|
||||
import {
|
||||
ProvidersApi,
|
||||
@@ -73,7 +74,7 @@ export class SCIMProviderUserList extends Table<SCIMProviderUser> {
|
||||
}
|
||||
|
||||
protected override rowLabel(item: SCIMProviderUser): string {
|
||||
return item.userObj.name || item.userObj.username;
|
||||
return getUserDisplayName(item.userObj);
|
||||
}
|
||||
|
||||
protected columns: TableColumn[] = [
|
||||
|
||||
@@ -2,6 +2,7 @@ import { DEFAULT_CONFIG } from "#common/api/config";
|
||||
|
||||
import { PaginatedResponse, Table, TableColumn } from "#elements/table/Table";
|
||||
import { SlottedTemplateResult } from "#elements/types";
|
||||
import { getUserDisplayName } from "#elements/user/utils";
|
||||
|
||||
import { SCIMSourceUser, SourcesApi } from "@goauthentik/api";
|
||||
|
||||
@@ -25,7 +26,7 @@ export class SCIMSourceUserList extends Table<SCIMSourceUser> {
|
||||
}
|
||||
|
||||
protected override rowLabel(item: SCIMSourceUser): string {
|
||||
return item.userObj.name || item.userObj.username;
|
||||
return getUserDisplayName(item.userObj);
|
||||
}
|
||||
|
||||
protected columns: TableColumn[] = [
|
||||
|
||||
Reference in New Issue
Block a user