diff --git a/config/config.yml b/config/config.yml index 8b1966b100..b5eecd112f 100644 --- a/config/config.yml +++ b/config/config.yml @@ -3,7 +3,3 @@ rest: host: api7.dspace.org port: 443 nameSpace: /server - -info: - enableEndUserAgreement: false - enablePrivacyStatement: false diff --git a/src/app/shared/cookies/browser-klaro.service.ts b/src/app/shared/cookies/browser-klaro.service.ts index e65b7c8b86..638d465864 100644 --- a/src/app/shared/cookies/browser-klaro.service.ts +++ b/src/app/shared/cookies/browser-klaro.service.ts @@ -63,6 +63,11 @@ export class BrowserKlaroService extends KlaroService { * - Add and translate klaro configuration messages */ initialize() { + if (!environment.info.enablePrivacyStatement) { + delete this.klaroConfig.privacyPolicy; + this.klaroConfig.translations.en.consentNotice.description = 'cookies.consent.content-notice.description.no-privacy'; + } + this.translateService.setDefaultLang(environment.defaultLanguage); const user$: Observable = this.getUser$(); @@ -90,11 +95,6 @@ export class BrowserKlaroService extends KlaroService { this.translateConfiguration(); Klaro.setup(this.klaroConfig); }); - - if (!environment.info.enablePrivacyStatement) { - delete this.klaroConfig.privacyPolicy; - } - } /** diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 5d7be2a681..bf2d37fbf9 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -1225,6 +1225,8 @@ "cookies.consent.content-notice.description": "We collect and process your personal information for the following purposes: Authentication, Preferences, Acknowledgement and Statistics.
To learn more, please read our {privacyPolicy}.", + "cookies.consent.content-notice.description.no-privacy": "We collect and process your personal information for the following purposes: Authentication, Preferences, Acknowledgement and Statistics.", + "cookies.consent.content-notice.learnMore": "Customize", "cookies.consent.content-modal.description": "Here you can see and customize the information that we collect about you.", diff --git a/src/config/default-app-config.ts b/src/config/default-app-config.ts index 4108444443..11761af49a 100644 --- a/src/config/default-app-config.ts +++ b/src/config/default-app-config.ts @@ -325,6 +325,14 @@ export class DefaultAppConfig implements AppConfig { image: false, video: false }; + // Whether the end-user-agreement and privacy policy feature should be enabled or not. + // Disabling the end user agreement feature will result in: + // - Users no longer being forced to accept the end-user-agreement before they can access the repository + // - A 404 page if you manually try to navigate to the end-user-agreement page at info/end-user-agreement + // - All end-user-agreement related links and pages will be removed from the UI (e.g. in the footer) + // Disabling the privacy policy feature will result in: + // - A 404 page if you manually try to navigate to the privacy policy page at info/privacy + // - All mentions of the privacy policy being removed from the UI (e.g. in the footer) info: InfoConfig = { enableEndUserAgreement: true, enablePrivacyStatement: true