diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html index 97265d7a23..13d84e6e2e 100644 --- a/src/app/footer/footer.component.html +++ b/src/app/footer/footer.component.html @@ -75,7 +75,7 @@ {{ 'footer.link.end-user-agreement' | translate}} -
  • +
  • {{ 'footer.link.feedback' | translate}}
  • diff --git a/src/app/footer/footer.component.spec.ts b/src/app/footer/footer.component.spec.ts index 15b289d5fb..9f0250edc4 100644 --- a/src/app/footer/footer.component.spec.ts +++ b/src/app/footer/footer.component.spec.ts @@ -15,6 +15,8 @@ import { FooterComponent } from './footer.component'; import { TranslateLoaderMock } from '../shared/mocks/translate-loader.mock'; import { storeModuleConfig } from '../app.reducer'; +import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service'; +import { AuthorizationDataServiceStub } from '../shared/testing/authorization-service.stub'; let comp: FooterComponent; let fixture: ComponentFixture; @@ -34,7 +36,8 @@ describe('Footer component', () => { })], declarations: [FooterComponent], // declare the test component providers: [ - FooterComponent + FooterComponent, + { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }); diff --git a/src/app/footer/footer.component.ts b/src/app/footer/footer.component.ts index c4195c8eb3..f5e4c3799a 100644 --- a/src/app/footer/footer.component.ts +++ b/src/app/footer/footer.component.ts @@ -2,6 +2,9 @@ import { Component, Optional } from '@angular/core'; import { hasValue } from '../shared/empty.util'; import { KlaroService } from '../shared/cookies/klaro.service'; import { environment } from '../../environments/environment'; +import { Observable } from 'rxjs'; +import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service'; +import { FeatureID } from '../core/data/feature-authorization/feature-id'; @Component({ selector: 'ds-footer', @@ -17,8 +20,13 @@ export class FooterComponent { showTopFooter = false; showPrivacyPolicy = environment.info.enablePrivacyStatement; showEndUserAgreement = environment.info.enableEndUserAgreement; + showSendFeedback$: Observable; - constructor(@Optional() private cookies: KlaroService) { + constructor( + @Optional() private cookies: KlaroService, + private authorizationService: AuthorizationDataService, + ) { + this.showSendFeedback$ = this.authorizationService.isAuthorized(FeatureID.CanSendFeedback); } showCookieSettings() {