From 2748ced8e2f08f6dff04ccc8cbf708799ad22c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Thu, 3 Apr 2025 16:26:36 +0200 Subject: [PATCH] feat: only admin can fetch license (#9697) Non admins can not fetch the license they're still allowed to check it but not to get it --- .../component/banners/internalBanners/LicenseBanner.tsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/frontend/src/component/banners/internalBanners/LicenseBanner.tsx b/frontend/src/component/banners/internalBanners/LicenseBanner.tsx index ae56e53acc..7d90b1e7dd 100644 --- a/frontend/src/component/banners/internalBanners/LicenseBanner.tsx +++ b/frontend/src/component/banners/internalBanners/LicenseBanner.tsx @@ -1,15 +1,11 @@ import { Banner } from 'component/banners/Banner/Banner'; -import { - useLicense, - useLicenseCheck, -} from 'hooks/api/getters/useLicense/useLicense'; +import { useLicenseCheck } from 'hooks/api/getters/useLicense/useLicense'; import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig'; import type { BannerVariant } from 'interfaces/banner'; export const LicenseBanner = () => { const { isEnterprise } = useUiConfig(); const licenseInfo = useLicenseCheck(); - const license = useLicense(); // Only for enterprise if ( @@ -29,7 +25,7 @@ export const LicenseBanner = () => { return ; } else { - if (!license.loading && !license.error && licenseInfo.message) { + if (licenseInfo.message) { const banner = { message: licenseInfo.message, variant: mapToVariant(licenseInfo.messageType),