Bug 28998: (follow-up) Add warning on about for missing key

Test plan:
Make sure that you have no encryption_key in koha-conf.
Check about page, system information tab.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Marcel de Rooy 2022-04-22 07:33:28 +00:00 committed by Fridolin Somers
parent fae45d2991
commit 54765867b2
2 changed files with 11 additions and 0 deletions

View File

@ -277,6 +277,10 @@ if ( ! C4::Context->config('tmp_path') ) {
}
}
if( ! C4::Context->config('encryption_key') ) {
push @xml_config_warnings, { error => 'encryption_key_missing' };
}
# Test Zebra facets configuration
if ( !defined C4::Context->config('use_zebra_facets') ) {
push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' };

View File

@ -484,6 +484,13 @@
The effective temporary directory is '[% config_entry.effective_tmp_dir | html %]'.
</td>
</tr>
[% ELSIF config_entry.error == 'encryption_key_missing' %]
<tr>
<th scope="row"><strong>Warning</strong></th>
<td>You are missing the &lt;encryption_key&gt; entry in your koha-conf.xml file.
Please generate a key. We recommend one of at least 32 bytes. (You might use 'pwgen 32' to do so.)
</td>
</tr>
[% END %]
[% END %]
</table>