From 0077fb8c639434573ba871eaafe10c1af4727168 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sun, 18 Jun 2023 21:08:00 +0200 Subject: [PATCH] Harmonize use of permissions * About page * Landing page --- apps/client/src/app/app.component.html | 2 +- apps/client/src/app/app.component.ts | 6 +++++ .../overview/about-overview-page.component.ts | 6 +++++ .../about/overview/about-overview-page.html | 8 +++--- .../src/app/pages/landing/landing-page.html | 25 +++---------------- 5 files changed, 21 insertions(+), 26 deletions(-) diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index fa135f2fa..29dd2c46e 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -89,7 +89,7 @@
  • License
  • -
  • +
  • Open Startup
  • diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 574cf1f01..6a8a3a64d 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -33,6 +33,7 @@ export class AppComponent implements OnDestroy, OnInit { public currentYear = new Date().getFullYear(); public deviceType: string; public hasPermissionForBlog: boolean; + public hasPermissionForStatistics: boolean; public hasPermissionForSubscription: boolean; public hasPermissionToAccessFearAndGreedIndex: boolean; public info: InfoItem; @@ -70,6 +71,11 @@ export class AppComponent implements OnDestroy, OnInit { permissions.enableSubscription ); + this.hasPermissionForStatistics = hasPermission( + this.info?.globalPermissions, + permissions.enableStatistics + ); + this.hasPermissionToAccessFearAndGreedIndex = hasPermission( this.info?.globalPermissions, permissions.enableFearAndGreedIndex diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts index 460319afe..9e33985d0 100644 --- a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts +++ b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts @@ -15,6 +15,7 @@ import { takeUntil } from 'rxjs/operators'; }) export class AboutOverviewPageComponent implements OnDestroy, OnInit { public hasPermissionForBlog: boolean; + public hasPermissionForStatistics: boolean; public hasPermissionForSubscription: boolean; public isLoggedIn: boolean; public user: User; @@ -34,6 +35,11 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit { permissions.enableBlog ); + this.hasPermissionForStatistics = hasPermission( + globalPermissions, + permissions.enableStatistics + ); + this.hasPermissionForSubscription = hasPermission( globalPermissions, permissions.enableSubscription diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.html b/apps/client/src/app/pages/about/overview/about-overview-page.html index 40e0ac036..870655bcc 100644 --- a/apps/client/src/app/pages/about/overview/about-overview-page.html +++ b/apps/client/src/app/pages/about/overview/about-overview-page.html @@ -19,9 +19,11 @@ title="GNU Affero General Public License" >AGPL-3.0 license - and we share aggregated - key metrics - of the platform’s performance. The project has been initiated by + + and we share aggregated + key metrics + of the platform’s performance. The project has been initiated by Thomas Kaul diff --git a/apps/client/src/app/pages/landing/landing-page.html b/apps/client/src/app/pages/landing/landing-page.html index 1a463ccb5..5228c41b2 100644 --- a/apps/client/src/app/pages/landing/landing-page.html +++ b/apps/client/src/app/pages/landing/landing-page.html @@ -44,14 +44,13 @@
    -