From b095050dcf30b3848e0424d14d3a18c1167b2b23 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 8 Apr 2020 10:11:38 +0000 Subject: [PATCH] Bug 20484: Allow configuration of ES before switching to ES To test: 1 - Set SearchEngine syspref to Zebra 2 - Be a user with permission to manage search engine configuration (manage_search_engine_config) 3 - Confirm you do not see 'Search engine configuration' on Admin main page 4 - Apply patch 5 - Confirm you see it with '(Elasticsearch)' appended 6 - Be a user without above permission 7 - Confirm you cannot see the 'Search engine configuration' 8 - Confirm you cannot access directly: /cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson --- koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 6 +++--- .../en/modules/admin/searchengine/elasticsearch/mappings.tt | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc index f24f3e83fc..d87338bf72 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -63,7 +63,7 @@ [% END %] - [% IF ( CAN_user_parameters_manage_marc_frameworks || CAN_user_parameters_manage_classifications || CAN_user_parameters_manage_matching_rules || CAN_user_parameters_manage_oai_sets || CAN_user_parameters_manage_item_search_fields || (Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_manage_search_engine_config) ) %] + [% IF ( CAN_user_parameters_manage_marc_frameworks || CAN_user_parameters_manage_classifications || CAN_user_parameters_manage_matching_rules || CAN_user_parameters_manage_oai_sets || CAN_user_parameters_manage_item_search_fields || CAN_user_parameters_manage_search_engine_config ) %]
Catalog
[% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt index 541043a4a3..8cac45dfa1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt @@ -131,7 +131,7 @@
- [% IF ( CAN_user_parameters_manage_marc_frameworks || CAN_user_parameters_manage_classifications || CAN_user_parameters_manage_matching_rules || CAN_user_parameters_manage_oai_sets || CAN_user_parameters_manage_item_search_fields || (Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_manage_search_engine_config) ) %] + [% IF ( CAN_user_parameters_manage_marc_frameworks || CAN_user_parameters_manage_classifications || CAN_user_parameters_manage_matching_rules || CAN_user_parameters_manage_oai_sets || CAN_user_parameters_manage_item_search_fields || CAN_user_parameters_manage_search_engine_config ) %]

Catalog

[% IF ( CAN_user_parameters_manage_marc_frameworks ) %] @@ -162,8 +162,8 @@
Item search fields
Manage custom fields for item search.
[% END %] - [% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_manage_search_engine_config ) %] -
Search engine configuration
+ [% IF ( CAN_user_parameters_manage_search_engine_config ) %] +
Search engine configuration (Elasticsearch)
Manage indexes, facets, and their mappings to MARC fields and subfields.
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt index e3a207db96..92043e08c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/searchengine/elasticsearch/mappings.tt @@ -2,7 +2,7 @@ [% USE Asset %] [% PROCESS 'i18n.inc' %] [% INCLUDE 'doc-head-open.inc' %] -Koha › Administration › Search engine configuration +Koha › Administration › Search engine configuration (Elasticsearch) [% INCLUDE 'doc-head-close.inc' %] [% Asset.js("lib/jquery/plugins/jquery.tablednd.js") | $raw %]