diff --git a/openmetadata-ui/src/main/resources/ui/src/AppState.ts b/openmetadata-ui/src/main/resources/ui/src/AppState.ts index 3b32179ea21..733bd4eafc4 100644 --- a/openmetadata-ui/src/main/resources/ui/src/AppState.ts +++ b/openmetadata-ui/src/main/resources/ui/src/AppState.ts @@ -78,6 +78,7 @@ class AppState { } updateUserDetails(data: User) { this.userDetails = data; + this.nonSecureUserDetails = data; } updateNewUser(data: NewUser) { this.newUser = data; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/app-bar/Appbar.tsx b/openmetadata-ui/src/main/resources/ui/src/components/app-bar/Appbar.tsx index 9140faec033..d2fe63546a6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/app-bar/Appbar.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/app-bar/Appbar.tsx @@ -143,7 +143,7 @@ const Appbar: React.FC = (): JSX.Element => { const getUserName = () => { const currentUser = isAuthDisabled - ? appState.users[0] + ? appState.nonSecureUserDetails : appState.userDetails; return currentUser?.displayName || currentUser?.name || TERM_USER; @@ -151,7 +151,7 @@ const Appbar: React.FC = (): JSX.Element => { const getUserData = () => { const currentUser = isAuthDisabled - ? appState.users[0] + ? appState.nonSecureUserDetails : appState.userDetails; const name = currentUser?.displayName || currentUser?.name || TERM_USER; @@ -199,7 +199,7 @@ const Appbar: React.FC = (): JSX.Element => { {teams.map((t, i) => (

- {t.displayName} + {t.displayName || t.name}

))}