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

Closes #23954
This commit is contained in:
jackie-linz 2023-10-24 07:35:31 +13:00 committed by GitHub
parent fefe2f57ae
commit 03a8f05d14
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}