From 03a8f05d14c9ea07fd9759fa624e48dec4aeed01 Mon Sep 17 00:00:00 2001
From: jackie-linz <120340761+jackie-linz@users.noreply.github.com>
Date: Tue, 24 Oct 2023 07:35:31 +1300
Subject: [PATCH] fix exception when user does not have view-realm role
(#24036)
Closes #23954
---
js/apps/admin-ui/src/user/FederatedUserLink.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/js/apps/admin-ui/src/user/FederatedUserLink.tsx b/js/apps/admin-ui/src/user/FederatedUserLink.tsx
index 6b8b7e0db8..c0f0532643 100644
--- a/js/apps/admin-ui/src/user/FederatedUserLink.tsx
+++ b/js/apps/admin-ui/src/user/FederatedUserLink.tsx
@@ -35,10 +35,11 @@ export const FederatedUserLink = ({ user }: FederatedUserLinkProps) => {
if (!component) return null;
+ if (!access.hasAccess("view-realm")) return {component.name};
+
return (