Bugzilla – Attachment 81362 Details for
Bug 14391
Granular permissions for the administration module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14391: Move udpate to perl
Bug-14391-Move-udpate-to-perl.patch (text/plain), 9.33 KB, created by
Nick Clemens (kidclamp)
on 2018-10-27 14:10:29 UTC
(
hide
)
Description:
Bug 14391: Move udpate to perl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2018-10-27 14:10:29 UTC
Size:
9.33 KB
patch
obsolete
>From 40fcfdc04790eadf3d1274e7aa9ef5684ec4f3d4 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Sat, 27 Oct 2018 14:10:11 +0000 >Subject: [PATCH] Bug 14391: Move udpate to perl > >--- > .../bug14391_granular_admin_permissions.perl | 125 +++++++++++++++++++++ > 1 file changed, 125 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.perl > >diff --git a/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.perl b/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.perl >new file mode 100644 >index 0000000..f74d5ac >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug14391_granular_admin_permissions.perl >@@ -0,0 +1,125 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{ >+ INSERT IGNORE 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ $dbh->do(q{ >+ 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'); >+ }); >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 14391: Add granular permissions to the administration module)\n"; >+} >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14391
:
77461
|
77538
|
78109
|
79556
|
79557
|
79558
|
80004
|
80005
|
80006
|
80541
|
80542
|
80543
|
80547
| 81362 |
81451
|
81452
|
82022