From c1e5462db18776fc6f16808824e10d4b02474c1b Mon Sep 17 00:00:00 2001 From: Srdjan Date: Tue, 22 May 2012 17:56:43 +1200 Subject: [PATCH] bug_8083: parameters subpermissions: manage_circ_rules and parameters_remaining_permissions Signed-off-by: Kyle M Hall --- admin/admin-home.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/branches.pl | 2 +- admin/categorie.pl | 2 +- admin/checkmarc.pl | 2 +- admin/cities.pl | 2 +- admin/classsources.pl | 2 +- admin/clone-rules.pl | 2 +- admin/currency.pl | 2 +- admin/env_tz_test.pl | 2 +- admin/fieldmapping.pl | 2 +- admin/item_circulation_alerts.pl | 2 +- admin/itemtypes.pl | 2 +- admin/koha2marclinks.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/roadtype.pl | 2 +- admin/smart-rules.pl | 2 +- admin/stopwords.pl | 2 +- admin/systempreferences.pl | 2 +- admin/z3950servers.pl | 2 +- .../mysql/de-DE/mandatory/userpermissions.sql | 2 ++ .../mysql/en/mandatory/userpermissions.sql | 2 ++ .../mysql/es-ES/mandatory/userpermissions.sql | 2 ++ .../fr-FR/1-Obligatoire/userpermissions.sql | 2 ++ .../mysql/it-IT/necessari/userpermissions.sql | 2 ++ .../nb-NO/1-Obligatorisk/userpermissions.sql | 2 ++ .../mysql/pl-PL/mandatory/userpermissions.sql | 2 ++ .../mandatory/permissions_and_user_flags.sql | 2 ++ .../mandatory/permissions_and_user_flags.sql | 2 ++ installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++++ .../prog/en/modules/admin/admin-home.tt | 2 ++ 42 files changed, 69 insertions(+), 31 deletions(-) diff --git a/admin/admin-home.pl b/admin/admin-home.pl index 3db17c14c4..bf3d9af6e5 100755 --- a/admin/admin-home.pl +++ b/admin/admin-home.pl @@ -30,7 +30,7 @@ my ($template, $loggedinuser, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => '*'}, debug => 1, }); diff --git a/admin/auth_subfields_structure.pl b/admin/auth_subfields_structure.pl index 432d49667f..537f0ea227 100755 --- a/admin/auth_subfields_structure.pl +++ b/admin/auth_subfields_structure.pl @@ -57,7 +57,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/auth_tag_structure.pl b/admin/auth_tag_structure.pl index bd3dc93f77..906f8d3e82 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 => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 1545f0ea61..949e4882a6 100755 --- a/admin/authorised_values.pl +++ b/admin/authorised_values.pl @@ -55,7 +55,7 @@ our $dbh = C4::Context->dbh; our ($template, $borrowernumber, $cookie)= get_template_and_user({ template_name => "admin/authorised_values.tmpl", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, query => $input, type => "intranet", debug => 1, diff --git a/admin/authtypes.pl b/admin/authtypes.pl index 250a89c2ce..98693724e3 100755 --- a/admin/authtypes.pl +++ b/admin/authtypes.pl @@ -45,7 +45,7 @@ my ($template, $borrowernumber, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/biblio_framework.pl b/admin/biblio_framework.pl index f2c147e712..583bc50ac2 100755 --- a/admin/biblio_framework.pl +++ b/admin/biblio_framework.pl @@ -47,7 +47,7 @@ my ($template, $borrowernumber, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/branches.pl b/admin/branches.pl index c12762d78e..d172ea6819 100755 --- a/admin/branches.pl +++ b/admin/branches.pl @@ -63,7 +63,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1}, + flagsrequired => { parameters => 'parameters_remaining_permissions'}, debug => 1, } ); diff --git a/admin/categorie.pl b/admin/categorie.pl index 7a02a5d5fb..63d629c366 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -73,7 +73,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/checkmarc.pl b/admin/checkmarc.pl index e08796fe8c..8734441f1b 100755 --- a/admin/checkmarc.pl +++ b/admin/checkmarc.pl @@ -34,7 +34,7 @@ my ($template, $borrowernumber, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/cities.pl b/admin/cities.pl index 0303a484cf..e00e6076bd 100755 --- a/admin/cities.pl +++ b/admin/cities.pl @@ -41,7 +41,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/classsources.pl b/admin/classsources.pl index 45183cd15f..e7f6c9a671 100755 --- a/admin/classsources.pl +++ b/admin/classsources.pl @@ -40,7 +40,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/clone-rules.pl b/admin/clone-rules.pl index dcf4abedbd..c9e4665a4a 100755 --- a/admin/clone-rules.pl +++ b/admin/clone-rules.pl @@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/currency.pl b/admin/currency.pl index e24f6b6fc9..aa878fd5d4 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -57,7 +57,7 @@ our ($template, $loggedinuser, $cookie) = get_template_and_user({ template_name => 'admin/currency.tmpl', query => $input, type => 'intranet', - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, authnotrequired => 0, }); diff --git a/admin/env_tz_test.pl b/admin/env_tz_test.pl index 5bd5cd778c..f549cd0e69 100755 --- a/admin/env_tz_test.pl +++ b/admin/env_tz_test.pl @@ -14,7 +14,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ query => $q, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/fieldmapping.pl b/admin/fieldmapping.pl index f7eca3c808..b03fdbb7c6 100755 --- a/admin/fieldmapping.pl +++ b/admin/fieldmapping.pl @@ -39,7 +39,7 @@ my ($template, $loggedinuser, $cookie) query => $query, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/item_circulation_alerts.pl b/admin/item_circulation_alerts.pl index ee77ae8bbb..2bfb496cc1 100755 --- a/admin/item_circulation_alerts.pl +++ b/admin/item_circulation_alerts.pl @@ -65,7 +65,7 @@ sub show { query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => defined($input->param('debug')), } ); diff --git a/admin/itemtypes.pl b/admin/itemtypes.pl index 3219da340e..841672d34d 100755 --- a/admin/itemtypes.pl +++ b/admin/itemtypes.pl @@ -77,7 +77,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/koha2marclinks.pl b/admin/koha2marclinks.pl index a89681dc35..fc320ad5bb 100755 --- a/admin/koha2marclinks.pl +++ b/admin/koha2marclinks.pl @@ -39,7 +39,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index bc6636a288..365a8613bb 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -72,7 +72,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index a86d78841b..d42e3452e4 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -52,7 +52,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/matching-rules.pl b/admin/matching-rules.pl index b1670260a6..2fa2ac6429 100755 --- a/admin/matching-rules.pl +++ b/admin/matching-rules.pl @@ -39,7 +39,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/oai_set_mappings.pl b/admin/oai_set_mappings.pl index 4d570f9f81..1a9762c767 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' => '*' }, + flagsrequired => { 'parameters' => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/oai_sets.pl b/admin/oai_sets.pl index a826107c6d..c923e87322 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' => '*' }, + flagsrequired => { 'parameters' => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 638456e6a1..c0ad1f70a4 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -42,7 +42,7 @@ our ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/preferences.pl b/admin/preferences.pl index 0dcec19fe6..b1ad005b8b 100755 --- a/admin/preferences.pl +++ b/admin/preferences.pl @@ -261,7 +261,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/printers.pl b/admin/printers.pl index c32b4e6b57..c7e7492eda 100755 --- a/admin/printers.pl +++ b/admin/printers.pl @@ -72,7 +72,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/roadtype.pl b/admin/roadtype.pl index a75659437f..6dd4a167ff 100755 --- a/admin/roadtype.pl +++ b/admin/roadtype.pl @@ -43,7 +43,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl index 8e5a2d5802..cb352144fc 100755 --- a/admin/smart-rules.pl +++ b/admin/smart-rules.pl @@ -38,7 +38,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'manage_circ_rules'}, debug => 1, }); diff --git a/admin/stopwords.pl b/admin/stopwords.pl index 7a24af78f7..a64745f594 100755 --- a/admin/stopwords.pl +++ b/admin/stopwords.pl @@ -48,7 +48,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "admin/stopwords.tmpl", query => $input, type => "intranet", - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, authnotrequired => 0, debug => 1, }); diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 3659791c2f..e12bd5f1cc 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -592,7 +592,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => { parameters => 1 }, + flagsrequired => { parameters => 'parameters_remaining_permissions' }, debug => 1, } ); diff --git a/admin/z3950servers.pl b/admin/z3950servers.pl index 3bc0ef29de..d6044fc454 100755 --- a/admin/z3950servers.pl +++ b/admin/z3950servers.pl @@ -75,7 +75,7 @@ my ($template, $loggedinuser, $cookie) query => $input, type => "intranet", authnotrequired => 0, - flagsrequired => {parameters => 1}, + flagsrequired => {parameters => 'parameters_remaining_permissions'}, debug => 1, }); diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql index a4bda594b6..7282cce021 100644 --- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql +++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql @@ -1,6 +1,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Übrige Ausleihberechtigungen'), ( 1, 'override_renewals', 'Gesperrte Verlängerungen überschreiben'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Vormerkungen für Benutzer setzen'), ( 6, 'modify_holds_priority', 'Vormerkungspriorität verändern'), ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'), diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index 72cc70f23e..070e8f595e 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -1,6 +1,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql index 72cc70f23e..070e8f595e 100644 --- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql +++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql @@ -1,6 +1,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql index c96e9c6376..4b8c66ef75 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql @@ -1,6 +1,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'), ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Réserver pour des adhérents'), ( 6, 'modify_holds_priority', 'Modifier la priorité des réservations'), ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'), diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql index 8be056c3f0..d0b5348a36 100644 --- a/installer/data/mysql/it-IT/necessari/userpermissions.sql +++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql @@ -3,6 +3,8 @@ SET FOREIGN_KEY_CHECKS=0; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Permessi rimanenti per la circolazione'), ( 1, 'override_renewals', 'Sblocca i rinnovi bloccati'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Fai prenotazioni per gli utenti'), ( 6, 'modify_holds_priority', 'Modifica priorità prenotazioni'), ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'), diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql index 3ef9666f53..a00535f33d 100644 --- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql +++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql @@ -22,6 +22,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Øvrige rettigheter for sirkulasjon'), ( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Foreta reservering for lånere'), ( 6, 'modify_holds_priority', 'Endre rekkefølge på reserveringer'), ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'), diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql index 4cd583ec79..1165af141f 100644 --- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql +++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql @@ -1,6 +1,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), ( 9, 'edit_catalogue', 'Edit catalogue'), diff --git a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql index f77ca01d94..00d6538045 100644 --- a/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql @@ -25,6 +25,8 @@ TRUNCATE permissions; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), diff --git a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql index 5e8b6f0c46..188a146643 100644 --- a/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql +++ b/installer/data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql @@ -25,6 +25,8 @@ TRUNCATE permissions; INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), ( 1, 'override_renewals', 'Override blocked renewals'), + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bb966445c2..e762b7cf7b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5536,6 +5536,24 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } + + + +$DBversion = "3.09.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("INSERT INTO permissions (module_bit, code, description) VALUES + ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), + ( 3, 'manage_circ_rules', 'manage circulation rules')"); + $dbh->do("INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'parameters_remaining_permissions' + FROM borrowers WHERE flags & (1 << 3)"); + $dbh->do("INSERT INTO user_permissions (borrowernumber, module_bit, code) + SELECT borrowernumber, 3, 'manage_circ_rules' + FROM borrowers WHERE flags & (1 << 3)"); + print "Upgrade to $DBversion done (Added parameters subpermissions)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) 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 cabe94f46b..a85d490c35 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 @@ -49,8 +49,10 @@
Define road types (street, avenue, way, etc.). Road types display as authorized values when adding/editing patrons and can be used in geographic statistics.
Patron attribute types
Define extended attributes (identifiers and statistical categories) for patron records
+[% 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 %]
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.
Item circulation alerts
-- 2.39.5