fix exception when user does not have view-realm role (#24036) (#24231)

Closes #23954

Co-authored-by: jackie-linz <120340761+jackie-linz@users.noreply.github.com>
This commit is contained in:
Jon Koops 2023-10-23 23:59:00 +02:00 committed by GitHub
parent e9550eb737
commit 02714d2982
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,10 +35,11 @@ export const FederatedUserLink = ({ user }: FederatedUserLinkProps) => {
if (!component) return null;
if (!access.hasAccess("view-realm")) return <span>{component.name}</span>;
return (
<Button
variant="link"
isDisabled={!access.hasAccess("view-realm")}
component={(props) => (
<Link
{...props}