File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ <h5 class="text-uppercase">Footer Content</h5>
7575 < a class ="text-white "
7676 routerLink ="info/end-user-agreement "> {{ 'footer.link.end-user-agreement' | translate}}</ a >
7777 </ li >
78- < li >
78+ < li *ngIf =" showSendFeedback$ | async " >
7979 < a class ="text-white "
8080 routerLink ="info/feedback "> {{ 'footer.link.feedback' | translate}}</ a >
8181 </ li >
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import { FooterComponent } from './footer.component';
1515
1616import { TranslateLoaderMock } from '../shared/mocks/translate-loader.mock' ;
1717import { storeModuleConfig } from '../app.reducer' ;
18+ import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service' ;
19+ import { AuthorizationDataServiceStub } from '../shared/testing/authorization-service.stub' ;
1820
1921let comp : FooterComponent ;
2022let fixture : ComponentFixture < FooterComponent > ;
@@ -34,7 +36,8 @@ describe('Footer component', () => {
3436 } ) ] ,
3537 declarations : [ FooterComponent ] , // declare the test component
3638 providers : [
37- FooterComponent
39+ FooterComponent ,
40+ { provide : AuthorizationDataService , useClass : AuthorizationDataServiceStub } ,
3841 ] ,
3942 schemas : [ CUSTOM_ELEMENTS_SCHEMA ]
4043 } ) ;
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import { Component, Optional } from '@angular/core';
22import { hasValue } from '../shared/empty.util' ;
33import { KlaroService } from '../shared/cookies/klaro.service' ;
44import { environment } from '../../environments/environment' ;
5+ import { Observable } from 'rxjs' ;
6+ import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service' ;
7+ import { FeatureID } from '../core/data/feature-authorization/feature-id' ;
58
69@Component ( {
710 selector : 'ds-footer' ,
@@ -17,8 +20,13 @@ export class FooterComponent {
1720 showTopFooter = false ;
1821 showPrivacyPolicy = environment . info . enablePrivacyStatement ;
1922 showEndUserAgreement = environment . info . enableEndUserAgreement ;
23+ showSendFeedback$ : Observable < boolean > ;
2024
21- constructor ( @Optional ( ) private cookies : KlaroService ) {
25+ constructor (
26+ @Optional ( ) private cookies : KlaroService ,
27+ private authorizationService : AuthorizationDataService ,
28+ ) {
29+ this . showSendFeedback$ = this . authorizationService . isAuthorized ( FeatureID . CanSendFeedback ) ;
2230 }
2331
2432 showCookieSettings ( ) {
You can’t perform that action at this time.
0 commit comments