From 1543134b346fd0c6eab26b3023ca6cf764a16952 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Thu, 18 Apr 2019 09:27:44 +0300 Subject: [PATCH] Bug 11529: (follow-up) Remove manage_keywords2koha_mappings permission. Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- installer/data/mysql/atomicupdate/bug_11529.perl | 4 ++++ installer/data/mysql/userpermissions.sql | 1 - koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc | 5 ----- koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_11529.perl b/installer/data/mysql/atomicupdate/bug_11529.perl index 6e784491c3..17800bf0ef 100644 --- a/installer/data/mysql/atomicupdate/bug_11529.perl +++ b/installer/data/mysql/atomicupdate/bug_11529.perl @@ -54,6 +54,10 @@ if( CheckVersion( $DBversion ) ) { $dbh->do( "DROP TABLE IF EXISTS fieldmapping" ); + $dbh->do( "DELETE FROM user_permissions WHERE code='manage_keywords2koha_mappings'" ); + + $dbh->do( "DELETE FROM permissions WHERE code='manage_keywords2koha_mappings'" ); + # Always end with this (adjust the bug info) SetVersion( $DBversion ); print "Upgrade to $DBversion done (Bug 11529 - Add medium, subtitle and part information to biblio table)\n"; diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index 911b81fab6..4401b5dda6 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -18,7 +18,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_item_circ_alerts', 'Manage item circulation alerts'), ( 3, 'manage_cities', 'Manage cities and towns'), ( 3, 'manage_marc_frameworks', 'Manage MARC bibliographic and authority frameworks'), - ( 3, 'manage_keywords2koha_mappings', 'Manage keywords to Koha mappings'), ( 3, 'manage_classifications', 'Manage classification sources'), ( 3, 'manage_matching_rules', 'Manage record matching rules'), ( 3, 'manage_oai_sets', 'Manage OAI sets'), 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 6f426ce792..fe094bd48a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -51,7 +51,7 @@ [% END %] - [% IF ( CAN_user_parameters_manage_keywords2koha_mappings || 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 || (Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_manage_search_engine_config) ) %]
Catalog
    [% IF ( CAN_user_parameters_manage_marc_frameworks ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 9fa6a625a6..26f779a1ff 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -171,11 +171,6 @@ Manage MARC bibliographic and authority frameworks and test them ([% name | html %]) - [%- CASE 'manage_keywords2koha_mappings' -%] - - Manage keywords to Koha mappings - - ([% name | html %]) [%- CASE 'manage_classifications' -%] Manage classification sources and filing rules 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 15200ad8fb..389b2ad406 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 @@ -108,7 +108,7 @@
    - [% IF ( CAN_user_parameters_manage_keywords2koha_mappings || 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 || (Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_manage_search_engine_config) ) %]

    Catalog

    [% IF ( CAN_user_parameters_manage_marc_frameworks ) %] -- 2.39.5