Browse Source

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 <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Katrin Fischer 3 years ago
committed by Nick Clemens
parent
commit
252f4674a5
  1. 2
      admin/audio_alerts.pl
  2. 2
      admin/auth_subfields_structure.pl
  3. 2
      admin/auth_tag_structure.pl
  4. 2
      admin/authorised_values.pl
  5. 2
      admin/authtypes.pl
  6. 2
      admin/biblio_framework.pl
  7. 2
      admin/branch_transfer_limits.pl
  8. 2
      admin/branches.pl
  9. 2
      admin/categories.pl
  10. 2
      admin/checkmarc.pl
  11. 2
      admin/cities.pl
  12. 2
      admin/classsources.pl
  13. 2
      admin/clone-rules.pl
  14. 2
      admin/columns_settings.pl
  15. 2
      admin/didyoumean.pl
  16. 2
      admin/fieldmapping.pl
  17. 2
      admin/import_export_framework.pl
  18. 2
      admin/item_circulation_alerts.pl
  19. 2
      admin/items_search_field.pl
  20. 2
      admin/items_search_fields.pl
  21. 2
      admin/itemtypes.pl
  22. 2
      admin/koha2marclinks.pl
  23. 2
      admin/library_groups.pl
  24. 2
      admin/localization.pl
  25. 2
      admin/marc_subfields_structure.pl
  26. 2
      admin/marctagstructure.pl
  27. 2
      admin/matching-rules.pl
  28. 2
      admin/oai_set_mappings.pl
  29. 2
      admin/oai_sets.pl
  30. 2
      admin/patron-attr-types.pl
  31. 2
      admin/preferences.pl
  32. 2
      admin/printers.pl
  33. 2
      admin/searchengine/elasticsearch/mappings.pl
  34. 2
      admin/sms_providers.pl
  35. 1
      admin/sru_modmapping.pl
  36. 2
      admin/systempreferences.pl
  37. 2
      admin/transport-cost-matrix.pl
  38. 2
      admin/usage_statistics.pl
  39. 2
      admin/z3950servers.pl
  40. 6
      api/v1/swagger/paths/cities.json
  41. 82
      installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.sql
  42. 23
      installer/data/mysql/userpermissions.sql
  43. 191
      koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc
  44. 23
      koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc
  45. 193
      koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
  46. 2
      svc/config/systempreferences
  47. 2
      svc/localization

2
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,
}
);

2
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,
}
);

2
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,
});

2
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,

2
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,
}
);

2
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,
}
);

2
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,
});

2
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,
}
);

2
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,
}
);

2
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,
});

2
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,
}
);

2
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,
});

2
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,
});

2
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,
}
);

2
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,
});

2
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,
}
);

2
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') {

2
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')),
}
);

2
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') || '';

2
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') || '';

2
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,
}
);

2
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,
}
);

2
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,
}
);

2
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,

2
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,
}
);

2
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,
});

2
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,
});

2
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,
} );

2
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,
} );

2
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' }
}
);

2
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,
}
);

2
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,
}
);

2
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' },
}
);

2
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,
}
);

1
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

2
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,
}
);

2
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");

2
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,
}
);

2
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";

6
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"
}
}
}

82
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

23
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'),

191
koha-tmpl/intranet-tmpl/prog/en/includes/admin-menu.inc

@ -2,86 +2,137 @@
<div id="navmenu">
<div id="navmenulist">
<h5>System preferences</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
</ul>
<h5>Basic parameters</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/branches.pl">Libraries</a></li>
<li><a href="/cgi-bin/koha/admin/library_groups.pl">Library groups</a></li>
<li><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></li>
<li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></li>
</ul>
<h5>Patrons and circulation</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></li>
<li><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></li>
<li><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></li>
<li><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></li>
<li><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></li>
<li><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></li>
<li><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></li>
</ul>
<h5>Catalog</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic framework</a></li>
<li><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></li>
<li><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></li>
<li><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC bibliographic framework test</a></li>
<li><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></li>
<li><a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a></li>
<li><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></li>
<li><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></li>
<li><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></li>
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]
<li><a href="/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl">Search engine configuration</a></li>
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
<h5>System preferences</h5>
<ul>
<li><a href="/cgi-bin/koha/admin/preferences.pl">System preferences</a></li>
</ul>
[% END %]
</ul>
[% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_parameters || CAN_user_acquisition_edi_manage ) %]
<h5>Acquisition parameters</h5>
<ul>
[% IF ( CAN_user_acquisition_currencies_manage ) %]
<li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></li>
[% END %]
[% IF ( CAN_user_acquisition_period_manage ) %]
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li>
[% IF ( CAN_user_parameters_manage_libraries || CAN_user_parameters_manage_itemtypes || CAN_user_parameters_manage_auth_values ) %]
<h5>Basic parameters</h5>
<ul>
[% IF ( CAN_user_parameters_manage_libraries ) %]
<li><a href="/cgi-bin/koha/admin/branches.pl">Libraries</a></li>
<li><a href="/cgi-bin/koha/admin/library_groups.pl">Library groups</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_itemtypes ) %]
<li><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_auth_values ) %]
<li><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></li>
[% END %]
</ul>
[% END %]
[% IF ( CAN_user_acquisition_budget_manage ) %]
<li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li>
[% 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 ) %]
<h5>Patrons and circulation</h5>
<ul>
[% IF ( CAN_user_parameters_patron_categories ) %]
<li><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_circ_rules ) %]
<li><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_patron_attributes ) %]
<li><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_transfers ) %]
<li><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></li>
<li><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_item_circ_alerts ) %]
<li><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_cities ) %]
<li><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></li>
[% END %]
</ul>
[% END %]
[% IF ( CAN_user_acquisition_edi_manage ) %]
<li><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></li>
<li><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></li>
[% 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) ) %]
<h5>Catalog</h5>
<ul>
[% IF ( CAN_user_parameters_manage_marc_frameworks ) %]
<li><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic framework</a></li>
<li><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_keywords2koha_mappings ) %]
<li><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_marc_frameworks ) %]
<li><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC bibliographic framework test</a></li>
<li><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_classifications ) %]
<li><a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_matching_rules ) %]
<li><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_oai_sets ) %]
<li><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_item_search_fields ) %]
<li><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></li>
[% END %]
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_search_engine_config ) %]
<li><a href="/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl">Search engine configuration</a></li>
[% END %]
</ul>
[% END %]
</ul>
[% END %]
[% IF CAN_user_plugins %]
<h5>Plugins</h5>
[% IF ( CAN_user_acquisition_period_manage || CAN_user_acquisition_budget_manage || CAN_user_parameters || CAN_user_acquisition_edi_manage ) %]
<h5>Acquisition parameters</h5>
<ul>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></li>
</ul>
[% END %]
<ul>
[% IF ( CAN_user_acquisition_currencies_manage ) %]
<li><a href="/cgi-bin/koha/admin/currency.pl">Currencies and exchange rates</a></li>
[% END %]
[% IF ( CAN_user_acquisition_period_manage ) %]
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a></li>
[% END %]
[% IF ( CAN_user_acquisition_budget_manage ) %]
<li><a href="/cgi-bin/koha/admin/aqbudgets.pl">Funds</a></li>
[% END %]
[% IF ( CAN_user_acquisition_edi_manage ) %]
<li><a href="/cgi-bin/koha/admin/edi_accounts.pl">EDI accounts</a></li>
<li><a href="/cgi-bin/koha/admin/edi_ean_accounts.pl">Library EANs</a></li>
[% END %]
</ul>
[% END %]
<h5>Additional parameters</h5>
[% IF CAN_user_plugins && plugins_enabled %]
<h5>Plugins</h5>
<ul>
<li><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></li>
</ul>
[% END %]
<ul>
<!-- <li><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></li> -->
<li><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a></li>
<li><a href="/cgi-bin/koha/admin/didyoumean.pl">Did you mean?</a></li>
<li><a href="/cgi-bin/koha/admin/columns_settings.pl">Columns settings</a></li>
<li><a href="/cgi-bin/koha/admin/audio_alerts.pl">Audio alerts</a></li>
[% IF Koha.Preference('SMSSendDriver') == 'Email' %]
<li><a href="/cgi-bin/koha/admin/sms_providers.pl">SMS cellular providers</a></li>
[% 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 ) %]
<h5>Additional parameters</h5>
<ul>
<!-- <li><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></li> -->
[% IF ( CAN_user_parameters_manage_search_targets ) %]
<li><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_didyoumean ) %]
<li><a href="/cgi-bin/koha/admin/didyoumean.pl">Did you mean?</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_column_config ) %]
<li><a href="/cgi-bin/koha/admin/columns_settings.pl">Columns settings</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_audio_alerts ) %]
<li><a href="/cgi-bin/koha/admin/audio_alerts.pl">Audio alerts</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) %]
<li><a href="/cgi-bin/koha/admin/sms_providers.pl">SMS cellular providers</a></li>
[% END %]
[% IF ( CAN_user_parameters_manage_usage_stats ) %]
<li><a href="/cgi-bin/koha/admin/usage_statistics.pl">Share usage statistics</a></li>
[% END %]
</ul>
[% END %]
<li><a href="/cgi-bin/koha/admin/usage_statistics.pl">Share usage statistics</a></li>
</ul>
</div>
</div>

23
koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc

@ -36,6 +36,29 @@
[%- CASE 'manage_circ_rules' -%]<span>manage circulation rules</span>
[%- CASE 'manage_circ_rules_from_any_libraries' -%]<span>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)</span>
[%- CASE 'parameters_remaining_permissions' -%]<span>Remaining system parameters permissions</span>
[%- CASE 'manage_circ_rules' -%]<span>Manage circulation rules</span>
[%- CASE 'manage_sysprefs' -%]<span>Manage global system preferences</span>
[%- CASE 'manage_libraries' -%]<span>Manage libraries and library groups</span>
[%- CASE 'manage_itemtypes' -%]<span>Manage item types</span>
[%- CASE 'manage_auth_values' -%]<span>Manage authorized value categories and authorized values</span>
[%- CASE 'manage_patron_categories' -%]<span>Manage patron categories</span>
[%- CASE 'manage_patron_attributes' -%]<span>Manage extended patron attributes</span>
[%- CASE 'manage_transfers' -%]<span>Manage library transfer limits and transport cost matrix</span>
[%- CASE 'manage_item_circ_alerts' -%]<span>Manage item circulation alerts</span>
[%- CASE 'manage_cities' -%]<span>Manage cities and towns</span>
[%- CASE 'manage_marc_frameworks' -%]<span>Manage MARC bibliographic and authority frameworks and test them</span>
[%- CASE 'manage_keywords2koha_mappings' -%]<span>Manage keywords to Koha mappings</span>
[%- CASE 'manage_classfications' -%]<span>Manage classification sources and filing rules</span>
[%- CASE 'manage_matching_rules' -%]<span>Manage record matching rules</span>
[%- CASE 'manage_oai_sets' -%]<span>Manage OAI sets</span>
[%- CASE 'manage_item_search_fields' -%]<span>Manage item search fields</span>
[%- CASE 'manage_search_engine_config' -%]<span>Manage search enginge configuration</span>
[%- CASE 'manage_search_targets' -%]<span>Manage Z39.50 and SRU server confiugration</span>
[%- CASE 'manage_didyoumean' -%]<span>Manage Did you mean? configuration</span>
[%- CASE 'manage_column_config' -%]<span>Manage column configuation</span>
[%- CASE 'manage_audio_alerts' -%]<span>Manage audio alerts</span>
[%- CASE 'manage_sms_providers' -%]<span>Manage SMS cellular providers</span>
[%- CASE 'manage_usage_stats' -%]<span>Manage usage statistics settings</span>
[%- CASE 'edit_borrowers' -%]<span>Add, modify and view patron information</span>
[%- CASE 'view_borrower_infos_from_any_libraries' -%]<span>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.</span>
[%- CASE 'modify_holds_priority' -%]<span>Modify holds priority</span>

193
koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt

@ -17,7 +17,7 @@
<h1>Koha administration</h1>
<div class="row">
<div class="col-md-6 sysprefs">
[% IF ( CAN_user_parameters_manage_sysprefs ) %]
<form action="/cgi-bin/koha/admin/preferences.pl" method="post">
<fieldset>
<h4><a href="/cgi-bin/koha/admin/preferences.pl">Global system preferences</a></h4>
@ -27,75 +27,114 @@
<input type="submit" name="ok" class="submit" value="Search" />
</fieldset>
</form>
[% END %]
[% IF ( CAN_user_parameters_manage_libraries || CAN_user_parameters_manage_itemtypes || CAN_user_parameters_manage_auth_values ) %]
<div class="hint"><h4>Hint:</h4><p>Configure these parameters in the order they appear.</p></div>
<h3>Basic parameters</h3>
<dl>
<dt><a href="/cgi-bin/koha/admin/branches.pl">Libraries</a></dt>
<dd>Define libraries.</dd>
<dt><a href="/cgi-bin/koha/admin/library_groups.pl">Library groups</a></dt>
<dd>Define hierarchical library groups.</dd>
<dt><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></dt>
<dd>Define item types used for circulation rules.</dd>
<dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></dt>
<dd>Define categories and authorized values for them.</dd>
[% IF ( CAN_user_parameters_manage_libraries ) %]
<dt><a href="/cgi-bin/koha/admin/branches.pl">Libraries</a></dt>
<dd>Define libraries.</dd>
<dt><a href="/cgi-bin/koha/admin/library_groups.pl">Library groups</a></dt>
<dd>Define hierarchical library groups.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_itemtypes ) %]
<dt><a href="/cgi-bin/koha/admin/itemtypes.pl">Item types</a></dt>
<dd>Define item types used for circulation rules.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_auth_values ) %]
<dt><a href="/cgi-bin/koha/admin/authorised_values.pl">Authorized values</a></dt>
<dd>Define categories and authorized values for them.</dd>
[% END %]
</dl>
[% 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 ) %]
<h3>Patrons and circulation</h3>
<dl>
<dt><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></dt>
<dd>Define patron categories.</dd>
[% IF CAN_user_parameters_manage_circ_rules %]
<dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt>
<dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd>
[% END %]
<dt><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></dt>
<dd>Define extended attributes (identifiers and statistical categories) for patron records</dd>
<dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></dt>
<dd>Define transport costs between branches</dd>
<dt><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></dt>
<dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
<dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
<dd>Define cities and towns that your patrons live in.</dd>
[% IF ( CAN_user_parameters_patron_categories ) %]
<dt><a href="/cgi-bin/koha/admin/categories.pl">Patron categories</a></dt>
<dd>Define patron categories.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_circ_rules ) %]
<dt><a href="/cgi-bin/koha/admin/smart-rules.pl">Circulation and fines rules</a></dt>
<dd>Define circulation and fines rules for combinations of libraries, patron categories, and item types</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_patron_attributes ) %]
<dt><a href="/cgi-bin/koha/admin/patron-attr-types.pl">Patron attribute types</a></dt>
<dd>Define extended attributes (identifiers and statistical categories) for patron records</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_transfers ) %]
<dt><a href="/cgi-bin/koha/admin/branch_transfer_limits.pl">Library transfer limits</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/transport-cost-matrix.pl">Transport cost matrix</a></dt>
<dd>Define transport costs between branches</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_item_circ_alerts ) %]
<dt><a href="/cgi-bin/koha/admin/item_circulation_alerts.pl">Item circulation alerts</a></dt>
<dd>Define rules for check-in and checkout notifications for combinations of libraries, patron categories, and item types</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_cities ) %]
<dt><a href="/cgi-bin/koha/admin/cities.pl">Cities and towns</a></dt>
<dd>Define cities and towns that your patrons live in.</dd>
[% END %]
</dl>
[% IF CAN_user_plugins && plugins_enabled %]
<h3>Plugins</h3>
<dl>
<dt><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></dt>
<dd>View, manage, configure and run plugins.</dd>
</dl>
[% END %]
</div>
<div class="col-md-6 sysprefs">
[% END %]
[% IF CAN_user_plugins && plugins_enabled %]
<h3>Plugins</h3>
<dl>
<dt><a href="/cgi-bin/koha/plugins/plugins-home.pl">Manage plugins</a></dt>
<dd>View, manage, configure and run plugins.</dd>
</dl>
[% END %]
</div>
<div class="col-md-6 sysprefs">
[% 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) ) %]
<h3>Catalog</h3>
<dl>
<dt><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic framework</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></dt>
<dd>Define the mapping between the Koha transactional database (SQL) and the MARC Bibliographic records.</dd>
<dt><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></dt>
<dd>Define the mapping between keywords and MARC fields. The keywords are used to find some data independently of the framework.</dd>
<dt><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Bibliographic framework test</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></dt>
<dd>Create and manage Authorities frameworks that define the characteristics of your MARC Records (field and subfield definitions).</dd>
<dt><a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a></dt>
<dd>Define classification sources (i.e., call number schemes) used by your collection. Also define filing rules used for sorting call numbers.</dd>
<dt><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></dt>
<dd>Manage rules for automatically matching MARC records during record imports.</dd>
<dt><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></dt>
<dd>Manage OAI Sets</dd>
<dt><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></dt>
<dd>Manage custom fields for item search.</dd>
[% IF Koha.Preference('SearchEngine') == 'Elasticsearch' %]
[% IF ( CAN_user_parameters_manage_marc_frameworks ) %]
<dt><a href="/cgi-bin/koha/admin/biblio_framework.pl">MARC bibliographic framework</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/koha2marclinks.pl">Koha to MARC mapping</a></dt>
<dd>Define the mapping between the Koha transactional database (SQL) and the MARC Bibliographic records.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_keywords2koha_mappings ) %]
<dt><a href="/cgi-bin/koha/admin/fieldmapping.pl">Keywords to MARC mapping</a></dt>
<dd>Define the mapping between keywords and MARC fields. The keywords are used to find some data independently of the framework.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_marc_frameworks ) %]
<dt><a href="/cgi-bin/koha/admin/checkmarc.pl">MARC Bibliographic framework test</a></dt>
<dd>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.</dd>
<dt><a href="/cgi-bin/koha/admin/authtypes.pl">Authority types</a></dt>
<dd>Create and manage Authorities frameworks that define the characteristics of your MARC Records (field and subfield definitions).</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_classifications ) %]
<dt><a href="/cgi-bin/koha/admin/classsources.pl">Classification sources</a></dt>
<dd>Define classification sources (i.e., call number schemes) used by your collection. Also define filing rules used for sorting call numbers.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_matching_rules ) %]
<dt><a href="/cgi-bin/koha/admin/matching-rules.pl">Record matching rules</a></dt>
<dd>Manage rules for automatically matching MARC records during record imports.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_oai_sets ) %]
<dt><a href="/cgi-bin/koha/admin/oai_sets.pl">OAI sets configuration</a></dt>
<dd>Manage OAI Sets</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_item_search_fields ) %]
<dt><a href="/cgi-bin/koha/admin/items_search_fields.pl">Item search fields</a></dt>
<dd>Manage custom fields for item search.</dd>
[% END %]
[% IF ( Koha.Preference('SearchEngine') == 'Elasticsearch' && CAN_user_parameters_search_engine_config ) %]
<dt><a href="/cgi-bin/koha/admin/searchengine/elasticsearch/mappings.pl">Search engine configuration</a></dt>
<dd>Manage indexes, facets, and their mappings to MARC fields and subfields.</dd>
[% END %]
</dl>
[% 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 ) %]
<h3>Acquisition parameters</h3>
<dl>
[% IF ( CAN_user_acquisition_currencies_manage ) %]
@ -117,27 +156,39 @@
<dd>Manage library EDI EANs</dd>
[% END %]
</dl>
[% 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 ) %]
<h3>Additional parameters</h3>
<dl>
<!-- <dt><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></dt>
<dd>Printers (UNIX paths).</dd> -->
<dt><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a></dt>
<dd>Define which external servers to query for MARC data.</dd>
<dt><a href="/cgi-bin/koha/admin/didyoumean.pl">Did you mean?</a></dt>
<dd>Choose which plugins to use to suggest searches to patrons and staff.</dd>
<dt><a href="/cgi-bin/koha/admin/columns_settings.pl">Configure columns</a></dt>
<dd>Hide or show columns for tables.</dd>
<dt><a href="/cgi-bin/koha/admin/audio_alerts.pl">Audio alerts</a></dt>
<dd>Define which events trigger which sounds</dd>
[% IF Koha.Preference('SMSSendDriver') == 'Email' %]
<dt><a href="/cgi-bin/koha/admin/sms_providers.pl">SMS cellular providers</a></dt>
<dd>Define a list of cellular providers for sending SMS messages via email.</dd>
[% END %]
<dt><a href="/cgi-bin/koha/admin/usage_statistics.pl">Share your usage statistics</a></dt>
<dd>Share with the Koha community the usage statistics of your Koha installation.</dd>
<!-- <dt><a href="/cgi-bin/koha/admin/printers.pl">Network Printers</a></dt>
<dd>Printers (UNIX paths).</dd> -->
[% IF ( CAN_user_parameters_manage_search_targets ) %]
<dt><a href="/cgi-bin/koha/admin/z3950servers.pl">Z39.50/SRU servers</a></dt>
<dd>Define which external servers to query for MARC data.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_didyoumean ) %]
<dt><a href="/cgi-bin/koha/admin/didyoumean.pl">Did you mean?</a></dt>
<dd>Choose which plugins to use to suggest searches to patrons and staff.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_column_config ) %]
<dt><a href="/cgi-bin/koha/admin/columns_settings.pl">Configure columns</a></dt>
<dd>Hide or show columns for tables.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_audio_alerts ) %]
<dt><a href="/cgi-bin/koha/admin/audio_alerts.pl">Audio alerts</a></dt>
<dd>Define which events trigger which sounds</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_sms_providers && Koha.Preference('SMSSendDriver') == 'Email' ) %]
<dt><a href="/cgi-bin/koha/admin/sms_providers.pl">SMS cellular providers</a></dt>
<dd>Define a list of cellular providers for sending SMS messages via email.</dd>
[% END %]
[% IF ( CAN_user_parameters_manage_usage_stats ) %]
<dt><a href="/cgi-bin/koha/admin/usage_statistics.pl">Share your usage statistics</a></dt>
<dd>Share with the Koha community the usage statistics of your Koha installation.</dd>
[% END %]
</dl>
[% END %]
</div>
</div>
</div>

2
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

2
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') });

Loading…
Cancel
Save