From 252f4674a56301c22dda32f2d41985c26f185650 Mon Sep 17 00:00:00 2001 From: Katrin Fischer Date: Sat, 19 May 2018 05:32:14 +0000 Subject: [PATCH] Bug 14391: Add granular permissions to the administration module So far the administration module only allowed for 2 permissions: - circulation conditions (manage_circ_rules) - everything else (parameters_remaining_permissions) With this patch almost every section of the administration page will have its own granular permission. To test: - Create different staff users: 1) One with parameters_remaining_permissions 2) One with parameters 3) One with catalogue and no parameters 4) One superlibrarian - Apply the patch - Run the database update - Check the staff users: 1) All subpermissions, but manage_circ_rules should be checked 2) Nothing should have changed 3) manage_item_serach_fields shoudl be checked (page had catalogue permission before) 4) Nothing should have changed - Try different settings of the permissions and verify that - Administration page behaves correctly - Administration menu behaves correctly ! You shoudl only see what you have permission for https://bugs.koha-community.org/show_bug.cgi?id=14391 Signed-off-by: Owen Leonard Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens --- admin/audio_alerts.pl | 2 +- admin/auth_subfields_structure.pl | 2 +- admin/auth_tag_structure.pl | 2 +- admin/authorised_values.pl | 2 +- admin/authtypes.pl | 2 +- admin/biblio_framework.pl | 2 +- admin/branch_transfer_limits.pl | 2 +- admin/branches.pl | 2 +- admin/categories.pl | 2 +- admin/checkmarc.pl | 2 +- admin/cities.pl | 2 +- admin/classsources.pl | 2 +- admin/clone-rules.pl | 2 +- admin/columns_settings.pl | 2 +- admin/didyoumean.pl | 2 +- admin/fieldmapping.pl | 2 +- admin/import_export_framework.pl | 2 +- admin/item_circulation_alerts.pl | 2 +- admin/items_search_field.pl | 2 +- admin/items_search_fields.pl | 2 +- admin/itemtypes.pl | 2 +- admin/koha2marclinks.pl | 2 +- admin/library_groups.pl | 2 +- admin/localization.pl | 2 +- admin/marc_subfields_structure.pl | 2 +- admin/marctagstructure.pl | 2 +- admin/matching-rules.pl | 2 +- admin/oai_set_mappings.pl | 2 +- admin/oai_sets.pl | 2 +- admin/patron-attr-types.pl | 2 +- admin/preferences.pl | 2 +- admin/printers.pl | 2 +- admin/searchengine/elasticsearch/mappings.pl | 2 +- admin/sms_providers.pl | 2 +- admin/sru_modmapping.pl | 1 + admin/systempreferences.pl | 2 +- admin/transport-cost-matrix.pl | 2 +- admin/usage_statistics.pl | 2 +- admin/z3950servers.pl | 2 +- api/v1/swagger/paths/cities.json | 6 +- .../bug14391_granular_admin_permissions.sql | 82 ++++++++ installer/data/mysql/userpermissions.sql | 23 ++- .../prog/en/includes/admin-menu.inc | 191 ++++++++++------- .../prog/en/includes/permissions.inc | 23 +++ .../prog/en/modules/admin/admin-home.tt | 193 +++++++++++------- svc/config/systempreferences | 2 +- svc/localization | 2 +- 47 files changed, 414 insertions(+), 185 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.sql diff --git a/admin/audio_alerts.pl b/admin/audio_alerts.pl index bf0c0ae83c..759eddc05b 100755 --- a/admin/audio_alerts.pl +++ b/admin/audio_alerts.pl @@ -40,7 +40,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $cgi, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_audio_alerts' }, debug => 1, } ); diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index 14408594f3..e19edfbe8c 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -62,7 +62,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, } ); diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index 121e04f17d..3852ea691c 100755 --- a/admin/auth_tag_structure.pl +++ b/admin/auth_tag_structure.pl @@ -50,7 +50,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_marc_frameworks'}, debug => 1, }); diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 272ed0012b..4f951291e4 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -40,7 +40,7 @@ my @messages; our ($template, $borrowernumber, $cookie)= get_template_and_user({ template_name => "admin/authorised_values.tt", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_auth_values'}, query => $input, type => "intranet", debug => 1, diff --git a/admin/authtypes.pl b/admin/authtypes.pl index 7be61e012d..c864db792a 100755 --- a/admin/authtypes.pl +++ b/admin/authtypes.pl @@ -37,7 +37,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, } ); diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index d99351b18c..0c30e95774 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -39,7 +39,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, } ); diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl index 681f85b6bd..82a8d214c9 100755 --- a/admin/branch_transfer_limits.pl +++ b/admin/branch_transfer_limits.pl @@ -33,7 +33,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "admin/branch_transfer_limits.tt", query => $input, type => "intranet", - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_transfers'}, debug => 1, }); diff --git a/admin/branches.pl b/admin/branches.pl index 37c1def91d..68b9c25ce5 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -39,7 +39,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_libraries' }, debug => 1, } ); diff --git a/admin/categories.pl b/admin/categories.pl index 358ef7d8c8..b6b6975a77 100755 --- a/admin/categories.pl +++ b/admin/categories.pl @@ -43,7 +43,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_patron_categories' }, debug => 1, } ); diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl index ec4b954236..3f5f61b6b4 100755 --- a/admin/checkmarc.pl +++ b/admin/checkmarc.pl @@ -33,7 +33,7 @@ my ($template, $borrowernumber, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, }); diff --git a/admin/cities.pl b/admin/cities.pl index 4a6247ce8f..de86112797 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -37,7 +37,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_cities' }, debug => 1, } ); diff --git a/admin/classsources.pl b/admin/classsources.pl index ff6d86e36e..1dd0710402 100755 --- a/admin/classsources.pl +++ b/admin/classsources.pl @@ -39,7 +39,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_classifications'}, debug => 1, }); diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl index 73d0f54878..dd071252d9 100755 --- a/admin/clone-rules.pl +++ b/admin/clone-rules.pl @@ -41,7 +41,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_circ_rules'}, debug => 1, }); diff --git a/admin/columns_settings.pl b/admin/columns_settings.pl index 4c8714270e..5283963184 100755 --- a/admin/columns_settings.pl +++ b/admin/columns_settings.pl @@ -15,7 +15,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_column_config' }, debug => 1, } ); diff --git a/admin/didyoumean.pl b/admin/didyoumean.pl index d34ed044f3..ef99c8b754 100755 --- a/admin/didyoumean.pl +++ b/admin/didyoumean.pl @@ -16,7 +16,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => 'manage_didyoumean'}, debug => 1, }); diff --git a/admin/fieldmapping.pl b/admin/fieldmapping.pl index 631e7d4380..ac13cc201c 100755 --- a/admin/fieldmapping.pl +++ b/admin/fieldmapping.pl @@ -41,7 +41,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_keywords2marc_mappings' }, debug => 1, } ); diff --git a/admin/import_export_framework.pl b/admin/import_export_framework.pl index 237be1d80a..ad95804dba 100755 --- a/admin/import_export_framework.pl +++ b/admin/import_export_framework.pl @@ -31,7 +31,7 @@ my ($auth_status, $sessionID); if (exists $cookies{'CGISESSID'}) { ($auth_status, $sessionID) = check_cookie_auth( $cookies{'CGISESSID'}->value, - { parameters => 'parameters_remaining_permissions' }, + { parameters => 'manage_marc_frameworks' }, ); } if ($auth_status eq 'ok') { diff --git a/admin/item_circulation_alerts.pl b/admin/item_circulation_alerts.pl index ea8b4e90ee..9ea89a5b53 100755 --- a/admin/item_circulation_alerts.pl +++ b/admin/item_circulation_alerts.pl @@ -44,7 +44,7 @@ sub show { query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'item_circ_alerts' }, debug => defined($input->param('debug')), } ); diff --git a/admin/items_search_field.pl b/admin/items_search_field.pl index c1f6c0c3e7..a5d87ee604 100755 --- a/admin/items_search_field.pl +++ b/admin/items_search_field.pl @@ -31,7 +31,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ query => $cgi, type => 'intranet', authnotrequired => 0, - flagsrequired => { catalogue => 1 }, + flagsrequired => { parameters => 'manage_item_search_fields' }, }); my $op = $cgi->param('op') || ''; diff --git a/admin/items_search_fields.pl b/admin/items_search_fields.pl index f93f0bbf70..4afa7383c5 100755 --- a/admin/items_search_fields.pl +++ b/admin/items_search_fields.pl @@ -31,7 +31,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ query => $cgi, type => 'intranet', authnotrequired => 0, - flagsrequired => { catalogue => 1 }, + flagsrequired => { parameters => 'manage_item_search_fields' }, }); my $op = $cgi->param('op') || ''; diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index cc790df012..d397fee4f9 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -46,7 +46,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_itemtypes' }, debug => 1, } ); diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index b337a3c380..0f987cfdf5 100755 --- a/admin/koha2marclinks.pl +++ b/admin/koha2marclinks.pl @@ -37,7 +37,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, } ); diff --git a/admin/library_groups.pl b/admin/library_groups.pl index a76f45e615..4c5ce25b4e 100755 --- a/admin/library_groups.pl +++ b/admin/library_groups.pl @@ -35,7 +35,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $cgi, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_libraries' }, debug => 1, } ); diff --git a/admin/localization.pl b/admin/localization.pl index 061b9792c8..f8bc553c05 100755 --- a/admin/localization.pl +++ b/admin/localization.pl @@ -31,7 +31,7 @@ my $query = new CGI; my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "admin/localization.tt", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_itemtypes' }, query => $query, type => "intranet", debug => 1, diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index e017e10aa3..25196491b1 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -75,7 +75,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, } ); diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 8b2dada530..e34edd557c 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -53,7 +53,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => { parameters => 'manage_marc_frameworks' }, debug => 1, }); diff --git a/admin/matching-rules.pl b/admin/matching-rules.pl index 3c30e94288..a9f85c63db 100755 --- a/admin/matching-rules.pl +++ b/admin/matching-rules.pl @@ -38,7 +38,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => { parameters => 'manage_matching_rules' }, debug => 1, }); diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl index 8c6b0d4255..af956583d1 100755 --- a/admin/oai_set_mappings.pl +++ b/admin/oai_set_mappings.pl @@ -45,7 +45,7 @@ my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { query => $input, type => 'intranet', authnotrequired => 0, - flagsrequired => { 'parameters' => 'parameters_remaining_permissions' }, + flagsrequired => { 'parameters' => 'manage_oai_sets' }, debug => 1, } ); diff --git a/admin/oai_sets.pl b/admin/oai_sets.pl index 1413022879..0c75680b36 100755 --- a/admin/oai_sets.pl +++ b/admin/oai_sets.pl @@ -41,7 +41,7 @@ my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { query => $input, type => 'intranet', authnotrequired => 0, - flagsrequired => { 'parameters' => 'parameters_remaining_permissions' }, + flagsrequired => { 'parameters' => 'manage_oai_sets' }, debug => 1, } ); diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index ca4e19060f..174bac5926 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -45,7 +45,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' } + flagsrequired => { parameters => 'manage_patron_attributes' } } ); diff --git a/admin/preferences.pl b/admin/preferences.pl index 03d0934907..113b7a5a19 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -300,7 +300,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_sysprefs' }, debug => 1, } ); diff --git a/admin/printers.pl b/admin/printers.pl index bd30bde139..57a9133552 100755 --- a/admin/printers.pl +++ b/admin/printers.pl @@ -70,7 +70,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => {parameters => '*'}, debug => 1, } ); diff --git a/admin/searchengine/elasticsearch/mappings.pl b/admin/searchengine/elasticsearch/mappings.pl index ecd8741533..95c61eb6ec 100755 --- a/admin/searchengine/elasticsearch/mappings.pl +++ b/admin/searchengine/elasticsearch/mappings.pl @@ -31,7 +31,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => 'intranet', authnotrequired => 0, - flagsrequired => { superlibrarian => 1 }, # Create a specific permission? + flagsrequired => { parameters => 'manage_search_engine_config' }, } ); diff --git a/admin/sms_providers.pl b/admin/sms_providers.pl index 614204ccc0..c52a68eacd 100755 --- a/admin/sms_providers.pl +++ b/admin/sms_providers.pl @@ -36,7 +36,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $cgi, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_sms_providers' }, debug => 1, } ); diff --git a/admin/sru_modmapping.pl b/admin/sru_modmapping.pl index c0ed86867f..80d284c668 100755 --- a/admin/sru_modmapping.pl +++ b/admin/sru_modmapping.pl @@ -32,6 +32,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { query => $input, type => "intranet", authnotrequired => 0, + flagsrequired => { parameters => 'manage_search_targets' }, }); # Main code: convert mapping string to hash structure and show template diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index b16143f723..32a5c93782 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -216,7 +216,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 'parameters_remaining_permissions' }, + flagsrequired => { parameters => 'manage_sysprefs' }, debug => 1, } ); diff --git a/admin/transport-cost-matrix.pl b/admin/transport-cost-matrix.pl index ea1086df42..beea9d2877 100755 --- a/admin/transport-cost-matrix.pl +++ b/admin/transport-cost-matrix.pl @@ -37,7 +37,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => { parameters => 'manage_transfers' }, debug => 1, }); my $use_transport_cost_matrix = C4::Context->preference("UseTransportCostMatrix"); diff --git a/admin/usage_statistics.pl b/admin/usage_statistics.pl index 01e002eda0..58df2655b8 100755 --- a/admin/usage_statistics.pl +++ b/admin/usage_statistics.pl @@ -30,7 +30,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => '*' }, + flagsrequired => { parameters => 'manage_usage_stats' }, debug => 1, } ); diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl index d1fe85b2f0..bb15e39121 100755 --- a/admin/z3950servers.pl +++ b/admin/z3950servers.pl @@ -44,7 +44,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 'parameters_remaining_permissions'}, + flagsrequired => { parameters => 'manage_search_targets' }, debug => 1, }); my $script_name = "/cgi-bin/koha/admin/z3950servers.pl"; diff --git a/api/v1/swagger/paths/cities.json b/api/v1/swagger/paths/cities.json index cb51dcba2a..96bbe55d28 100644 --- a/api/v1/swagger/paths/cities.json +++ b/api/v1/swagger/paths/cities.json @@ -112,7 +112,7 @@ }, "x-koha-authorization": { "permissions": { - "parameters": "parameters_remaining_permissions" + "parameters": "manage_cities" } } } @@ -213,7 +213,7 @@ }, "x-koha-authorization": { "permissions": { - "parameters": "parameters_remaining_permissions" + "parameters": "manage_cities" } } }, @@ -267,7 +267,7 @@ }, "x-koha-authorization": { "permissions": { - "parameters": "parameters_remaining_permissions" + "parameters": "manage_cities" } } } diff --git a/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.sql b/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.sql new file mode 100644 index 0000000000..500e883b52 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.sql @@ -0,0 +1,82 @@ +INSERT INTO permissions (module_bit, code, description) VALUES + ( 3, 'manage_sysprefs', 'Manage global system preferences'), + ( 3, 'manage_libraries', 'Manage libraries and library groups'), + ( 3, 'manage_itemtypes', 'Manage item types'), + ( 3, 'manage_auth_values', 'Manage authorized values'), + ( 3, 'manage_patron_categories', 'Manage patron categories'), + ( 3, 'manage_patron_attributes', 'Manage extended patron attributes'), + ( 3, 'manage_transfers', 'Manage library transfer limits and transport cost matrix'), + ( 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'), + ( 3, 'manage_item_search_fields', 'Manage item search fields'), + ( 3, 'manage_search_engine_config', 'Manage search engine configuration'), + ( 3, 'manage_search_targets', 'Manage Z39.50 and SRU server configuration'), + ( 3, 'manage_didyoumean', 'Manage Did you mean? configuration'), + ( 3, 'manage_column_config', 'Manage column configuration'), + ( 3, 'manage_sms_providers', 'Manage SMS cellular providers'), + ( 3, 'manage_audio_alerts', 'Manage audio alerts'), + ( 3, 'manage_usage_stats', 'Manage usage statistics settings'); + +/* User has parameters_remaining_permissions */ +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_sysprefs' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_libraries' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_itemtypes' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_auth_values' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_patron_categories' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_patron_attributes' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_transfers' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_item_circ_alerts' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_cities' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_marc_frameworks' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_keywords2koha_mappings' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_classifications' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_matching_rules' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_oai_sets' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_item_search_fields' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_search_engine_config' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_search_targets' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_didyoumean' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_column_config' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_sms_providers' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_audio_alerts' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_usage_stats' FROM borrowers WHERE borrowernumber IN (SELECT borrowernumber FROM user_permissions WHERE code = 'parameters_remaining_permissions'); + +/* User has catalogue permission */ +INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_item_search_fields' + FROM borrowers + WHERE borrowernumber IN + (SELECT borrowernumber FROM user_permissions WHERE code = 'catalogue'); + +/* Clean up now obsolete permission */ +DELETE FROM user_permissions WHERE module_bit = 3 and code = 'parameters_remaining_permissions'; +DELETE FROM permissions WHERE module_bit = 3 and code = 'parameters_remaining_permissions'; + +-- Bug 14391: Add granular permissions to the administration module diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index 9245615629..c2b8c17462 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -5,9 +5,30 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'force_checkout', 'Force checkout if a limitation exists'), ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), ( 1, 'manage_checkout_notes', 'Mark checkout notes as seen/not seen'), - ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), ( 3, 'manage_circ_rules', 'Manage circulation rules'), ( 3, 'manage_circ_rules_from_any_libraries', 'Manage circ rules for any libraries'), + ( 3, 'manage_sysprefs', 'Manage global system preferences'), + ( 3, 'manage_libraries', 'Manage libraries and library groups'), + ( 3, 'manage_itemtypes', 'Manage item types'), + ( 3, 'manage_auth_values', 'Manage authorized values'), + ( 3, 'manage_patron_categories', 'Manage patron categories'), + ( 3, 'manage_patron_attributes', 'Manage extended patron attributes'), + ( 3, 'manage_transfers', 'Manage library transfer limits and transport cost matrix'), + ( 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'), + ( 3, 'manage_item_search_fields', 'Manage item search fields'), + ( 3, 'manage_search_engine_config', 'Manage search engine configuration'), + ( 3, 'manage_search_targets', 'Manage Z39.50 and SRU server configuration'), + ( 3, 'manage_didyouean', 'Manage Did you mean? configuration'), + ( 3, 'manage_column_config', 'Manage column configuration'), + ( 3, 'manage_sms_providers', 'Manage SMS cellular providers'), + ( 3, 'manage_audio_alerts', 'Manage audio alerts'), + ( 3, 'manage_usage_stats', 'Manage usage statistics settings'), ( 4, 'edit_borrowers', 'Add, modify and view patron information'), ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), ( 6, 'place_holds', 'Place holds for patrons'), 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 974bccf832..671614f69f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc @@ -2,86 +2,137 @@ diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc index 0620310af8..39c6269623 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc @@ -36,6 +36,29 @@ [%- CASE 'manage_circ_rules' -%]manage circulation rules [%- CASE 'manage_circ_rules_from_any_libraries' -%]Edit circulation rules from any libraries. If not set the logged in user could only edit circulation rules for its the own library (please note that manage_circ_rules is still required) [%- CASE 'parameters_remaining_permissions' -%]Remaining system parameters permissions + [%- CASE 'manage_circ_rules' -%]Manage circulation rules + [%- CASE 'manage_sysprefs' -%]Manage global system preferences + [%- CASE 'manage_libraries' -%]Manage libraries and library groups + [%- CASE 'manage_itemtypes' -%]Manage item types + [%- CASE 'manage_auth_values' -%]Manage authorized value categories and authorized values + [%- CASE 'manage_patron_categories' -%]Manage patron categories + [%- CASE 'manage_patron_attributes' -%]Manage extended patron attributes + [%- CASE 'manage_transfers' -%]Manage library transfer limits and transport cost matrix + [%- CASE 'manage_item_circ_alerts' -%]Manage item circulation alerts + [%- CASE 'manage_cities' -%]Manage cities and towns + [%- CASE 'manage_marc_frameworks' -%]Manage MARC bibliographic and authority frameworks and test them + [%- CASE 'manage_keywords2koha_mappings' -%]Manage keywords to Koha mappings + [%- CASE 'manage_classfications' -%]Manage classification sources and filing rules + [%- CASE 'manage_matching_rules' -%]Manage record matching rules + [%- CASE 'manage_oai_sets' -%]Manage OAI sets + [%- CASE 'manage_item_search_fields' -%]Manage item search fields + [%- CASE 'manage_search_engine_config' -%]Manage search enginge configuration + [%- CASE 'manage_search_targets' -%]Manage Z39.50 and SRU server confiugration + [%- CASE 'manage_didyoumean' -%]Manage Did you mean? configuration + [%- CASE 'manage_column_config' -%]Manage column configuation + [%- CASE 'manage_audio_alerts' -%]Manage audio alerts + [%- CASE 'manage_sms_providers' -%]Manage SMS cellular providers + [%- CASE 'manage_usage_stats' -%]Manage usage statistics settings [%- CASE 'edit_borrowers' -%]Add, modify and view patron information [%- CASE 'view_borrower_infos_from_any_libraries' -%]View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries. [%- CASE 'modify_holds_priority' -%]Modify holds priority 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 db9443391e..6dbdad49fd 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 @@ -17,7 +17,7 @@

Koha administration

- + [% IF ( CAN_user_parameters_manage_sysprefs ) %]

Global system preferences

@@ -27,75 +27,114 @@
+ [% END %] + [% IF ( CAN_user_parameters_manage_libraries || CAN_user_parameters_manage_itemtypes || CAN_user_parameters_manage_auth_values ) %]

Hint:

Configure these parameters in the order they appear.

Basic parameters

-
Libraries
-
Define libraries.
-
Library groups
-
Define hierarchical library groups.
-
Item types
-
Define item types used for circulation rules.
-
Authorized values
-
Define categories and authorized values for them.
+ [% IF ( CAN_user_parameters_manage_libraries ) %] +
Libraries
+
Define libraries.
+
Library groups
+
Define hierarchical library groups.
+ [% END %] + [% IF ( CAN_user_parameters_manage_itemtypes ) %] +
Item types
+
Define item types used for circulation rules.
+ [% END %] + [% IF ( CAN_user_parameters_manage_auth_values ) %] +
Authorized values
+
Define categories and authorized values for them.
+ [% END %]
+ [% END %] + [% IF ( CAN_user_parameters_patron_categories || CAN_user_parameters_manage_circ_rules || CAN_user_parameters_manage_patron_attributes || CAN_user_parameters_manage_transfers || CAN_user_parameters_manage_item_circ_alerts || CAN_user_parameters_manage_cities ) %]

Patrons and circulation

-
Patron categories
-
Define patron categories.
- [% IF CAN_user_parameters_manage_circ_rules %] -
Circulation and fines rules
-
Define circulation and fines rules for combinations of libraries, patron categories, and item types
- [% END %] -
Patron attribute types
-
Define extended attributes (identifiers and statistical categories) for patron records
-
Library transfer limits
-
Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.
-
Transport cost matrix
-
Define transport costs between branches
-
Item circulation alerts
-
Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types
-
Cities and towns
-
Define cities and towns that your patrons live in.
+ [% IF ( CAN_user_parameters_patron_categories ) %] +
Patron categories
+
Define patron categories.
+ [% END %] + [% IF ( CAN_user_parameters_manage_circ_rules ) %] +
Circulation and fines rules
+
Define circulation and fines rules for combinations of libraries, patron categories, and item types
+ [% END %] + [% IF ( CAN_user_parameters_manage_patron_attributes ) %] +
Patron attribute types
+
Define extended attributes (identifiers and statistical categories) for patron records
+ [% END %] + [% IF ( CAN_user_parameters_manage_transfers ) %] +
Library transfer limits
+
Limit the ability to transfer items between libraries based on the library sending, the library receiving, and the item type involved. These rules only go into effect if the preference UseBranchTransferLimits is set to ON.
+
Transport cost matrix
+
Define transport costs between branches
+ [% END %] + [% IF ( CAN_user_parameters_manage_item_circ_alerts ) %] +
Item circulation alerts
+
Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types
+ [% END %] + [% IF ( CAN_user_parameters_manage_cities ) %] +
Cities and towns
+
Define cities and towns that your patrons live in.
+ [% END %]
- [% IF CAN_user_plugins && plugins_enabled %] -

Plugins

-
-
Manage plugins
-
View, manage, configure and run plugins.
-
- [% END %] -
-
+ [% END %] + + [% IF CAN_user_plugins && plugins_enabled %] +

Plugins

+
+
Manage plugins
+
View, manage, configure and run plugins.
+
+ [% 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_search_engine_config) ) %]

Catalog

-
MARC bibliographic framework
-
Create and manage Bibliographic frameworks that define the characteristics of your MARC Records (field and subfield definitions) as well as templates for the MARC editor.
-
Koha to MARC mapping
-
Define the mapping between the Koha transactional database (SQL) and the MARC Bibliographic records.
-
Keywords to MARC mapping
-
Define the mapping between keywords and MARC fields. The keywords are used to find some data independently of the framework.
-
MARC Bibliographic framework test
-
Checks the MARC structure. If you change your MARC Bibliographic framework it's recommended that you run this tool to test for errors in your definition.
-
Authority types
-
Create and manage Authorities frameworks that define the characteristics of your MARC Records (field and subfield definitions).
-
Classification sources
-
Define classification sources (i.e., call number schemes) used by your collection. Also define filing rules used for sorting call numbers.
-
Record matching rules
-
Manage rules for automatically matching MARC records during record imports.
-
OAI sets configuration
-
Manage OAI Sets
-
Item search fields
-
Manage custom fields for item search.
- [% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %] + [% IF ( CAN_user_parameters_manage_marc_frameworks ) %] +
MARC bibliographic framework
+
Create and manage Bibliographic frameworks that define the characteristics of your MARC Records (field and subfield definitions) as well as templates for the MARC editor.
+
Koha to MARC mapping
+
Define the mapping between the Koha transactional database (SQL) and the MARC Bibliographic records.
+ [% END %] + [% IF ( CAN_user_parameters_manage_keywords2koha_mappings ) %] +
Keywords to MARC mapping
+
Define the mapping between keywords and MARC fields. The keywords are used to find some data independently of the framework.
+ [% END %] + [% IF ( CAN_user_parameters_manage_marc_frameworks ) %] +
MARC Bibliographic framework test
+
Checks the MARC structure. If you change your MARC Bibliographic framework it's recommended that you run this tool to test for errors in your definition.
+
Authority types
+
Create and manage Authorities frameworks that define the characteristics of your MARC Records (field and subfield definitions).
+ [% END %] + [% IF ( CAN_user_parameters_manage_classifications ) %] +
Classification sources
+
Define classification sources (i.e., call number schemes) used by your collection. Also define filing rules used for sorting call numbers.
+ [% END %] + [% IF ( CAN_user_parameters_manage_matching_rules ) %] +
Record matching rules
+
Manage rules for automatically matching MARC records during record imports.
+ [% END %] + [% IF ( CAN_user_parameters_manage_oai_sets ) %] +
OAI sets configuration
+
Manage OAI Sets
+ [% END %] + [% IF ( CAN_user_parameters_manage_item_search_fields ) %] +
Item search fields
+
Manage custom fields for item search.
+ [% END %] + [% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_search_engine_config ) %]
Search engine configuration
Manage indexes, facets, and their mappings to MARC fields and subfields.
[% END %]
+ [% END %] - [% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_edi_manage ) %] + [% IF ( CAN_user_acquisition_currencies_manage || CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_acquisition_edi_manage ) %]

Acquisition parameters

[% IF ( CAN_user_acquisition_currencies_manage ) %] @@ -117,27 +156,39 @@
Manage library EDI EANs
[% END %]
- [% END %] + [% END %] + [% IF ( ( CAN_user_parameters_manage_search_targets || CAN_user_parameters_manage_didyoumean || CAN_user_parameters_manage_column_config || CAN_user_parameters_manage_audio_alerts || CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) || CAN_user_parameters_manage_usage_stats ) %]

Additional parameters

- -
Z39.50/SRU servers
-
Define which external servers to query for MARC data.
-
Did you mean?
-
Choose which plugins to use to suggest searches to patrons and staff.
-
Configure columns
-
Hide or show columns for tables.
-
Audio alerts
-
Define which events trigger which sounds
- [% IF Koha.Preference('SMSSendDriver') == 'Email' %] -
SMS cellular providers
-
Define a list of cellular providers for sending SMS messages via email.
- [% END %] -
Share your usage statistics
-
Share with the Koha community the usage statistics of your Koha installation.
+ + [% IF ( CAN_user_parameters_manage_search_targets ) %] +
Z39.50/SRU servers
+
Define which external servers to query for MARC data.
+ [% END %] + [% IF ( CAN_user_parameters_manage_didyoumean ) %] +
Did you mean?
+
Choose which plugins to use to suggest searches to patrons and staff.
+ [% END %] + [% IF ( CAN_user_parameters_manage_column_config ) %] +
Configure columns
+
Hide or show columns for tables.
+ [% END %] + [% IF ( CAN_user_parameters_manage_audio_alerts ) %] +
Audio alerts
+
Define which events trigger which sounds
+ [% END %] + [% IF ( CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) %] +
SMS cellular providers
+
Define a list of cellular providers for sending SMS messages via email.
+ [% END %] + [% IF ( CAN_user_parameters_manage_usage_stats ) %] +
Share your usage statistics
+
Share with the Koha community the usage statistics of your Koha installation.
+ [% END %]
+ [% END %]
diff --git a/svc/config/systempreferences b/svc/config/systempreferences index 675c1605cc..cfb111190b 100755 --- a/svc/config/systempreferences +++ b/svc/config/systempreferences @@ -41,7 +41,7 @@ batches. =cut -our ( $query, $response ) = C4::Service->init( parameters => 'parameters_remaining_permissions' ); +our ( $query, $response ) = C4::Service->init( parameters => 'manage_sysprefs' ); =head2 set_preference diff --git a/svc/localization b/svc/localization index e0f362d978..6eed60632c 100755 --- a/svc/localization +++ b/svc/localization @@ -6,7 +6,7 @@ use Encode qw( encode ); use C4::Service; use Koha::Localizations; -our ( $query, $response ) = C4::Service->init( parameters => 'parameters_remaining_permissions' ); +our ( $query, $response ) = C4::Service->init( parameters => 'manage_itemtypes' ); sub get_translations { my $rs = Koha::Localizations->search({ entity => $query->param('entity'), code => $query->param('code') }); -- 2.39.5