From 315464d2b2df177eb665dad15d58d66d41900471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADn?= Date: Tue, 4 Nov 2025 23:42:04 +0100 Subject: [PATCH] Do not show registration button if token auth is disabled --- .../src/app/components/header/header.component.html | 6 +++++- .../src/app/pages/features/features-page.component.ts | 6 ++++++ apps/client/src/app/pages/features/features-page.html | 2 +- .../src/app/pages/landing/landing-page.component.ts | 6 ++++++ apps/client/src/app/pages/landing/landing-page.html | 6 +++--- .../src/app/pages/pricing/pricing-page.component.ts | 9 ++++++++- apps/client/src/app/pages/pricing/pricing-page.html | 4 ++-- 7 files changed, 31 insertions(+), 8 deletions(-) diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 501119b31..c1917e843 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -422,7 +422,11 @@ Sign in - @if (currentRoute !== 'register' && hasPermissionToCreateUser) { + @if ( + currentRoute !== 'register' && + hasPermissionToCreateUser && + hasPermissionForAuthToken + ) {
  • - @if (!user) { + @if (!user && hasPermissionForAuthToken) {
    } - @if (hasPermissionToCreateUser) { + @if (hasPermissionToCreateUser && hasPermissionForAuthToken) {

    diff --git a/apps/client/src/app/pages/pricing/pricing-page.component.ts b/apps/client/src/app/pages/pricing/pricing-page.component.ts index 82560246f..c3cfd2ddc 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.component.ts +++ b/apps/client/src/app/pages/pricing/pricing-page.component.ts @@ -52,6 +52,7 @@ export class GfPricingPageComponent implements OnDestroy, OnInit { public coupon: number; public couponId: string; public durationExtension: StringValue; + public hasPermissionForAuthToken: boolean; public hasPermissionToUpdateUserSettings: boolean; public importAndExportTooltipBasic = translate( 'DATA_IMPORT_AND_EXPORT_TOOLTIP_BASIC' @@ -100,9 +101,15 @@ export class GfPricingPageComponent implements OnDestroy, OnInit { } public ngOnInit() { - const { baseCurrency, subscriptionOffer } = this.dataService.fetchInfo(); + const { baseCurrency, globalPermissions, subscriptionOffer } = + this.dataService.fetchInfo(); this.baseCurrency = baseCurrency; + this.hasPermissionForAuthToken = hasPermission( + globalPermissions, + permissions.enableAuthToken + ); + this.coupon = subscriptionOffer?.coupon; this.durationExtension = subscriptionOffer?.durationExtension; this.label = subscriptionOffer?.label; diff --git a/apps/client/src/app/pages/pricing/pricing-page.html b/apps/client/src/app/pages/pricing/pricing-page.html index 41af9f277..41ec74166 100644 --- a/apps/client/src/app/pages/pricing/pricing-page.html +++ b/apps/client/src/app/pages/pricing/pricing-page.html @@ -367,7 +367,7 @@

    - } @else if (!user) { + } @else if (!user && hasPermissionForAuthToken) {
    Get Started -

    It’s free.

    +

    It's free.

    }