From 71a30de965c8fef2966da7e7262567f11bf53e1b Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 26 Nov 2019 20:31:14 +0100 Subject: [PATCH] Bug 24151: Add warning to the about page if key is missing in the config Sponsored-by: Association KohaLa - https://koha-fr.org/ Signed-off-by: Signed-off-by: Sonia Bouis Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart --- about.pl | 7 +++++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/about.pl b/about.pl index 066db24e44..2135399a14 100755 --- a/about.pl +++ b/about.pl @@ -518,6 +518,13 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; } } +{ + # Test 'key' config for Pseudonymization + $template->param( config_key_no_set => 1 ) + if C4::Context->preference('Pseudonymization') + and not C4::Context->config('key'); +} + my %versions = C4::Context::get_versions(); $template->param( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index 7448d4094c..d3dae647cf 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -184,7 +184,7 @@
- [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_key_no_set %] [% IF (warnIsRootUser) %]

Warning regarding current user

You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.

@@ -259,7 +259,7 @@ [% END %] [% END %] - [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules %] + [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_key_no_set %]

Warnings regarding the system configuration

@@ -335,6 +335,11 @@ Some system preferences have badly formatted YAML content: [% bad_yaml_prefs.join(', ') | html %] [% END %] + [% IF config_key_no_set %] + + [% END %]
Preferences and parameters
Warning + System preference 'Pseudonymization' is set, but there is not 'key' entry defined in the $KOHA_CONF file. +
[% END %] -- 2.39.5