Bugzilla – Attachment 30915 Details for
Bug 7673
New patron permissions to manage items (edit, batchmod, delete all)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7673: DB changes - Add permissions
Bug-7673-DB-changes---Add-permissions.patch (text/plain), 13.18 KB, created by
Jonathan Druart
on 2014-08-18 09:10:32 UTC
(
hide
)
Description:
Bug 7673: DB changes - Add permissions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-08-18 09:10:32 UTC
Size:
13.18 KB
patch
obsolete
>From 9ae47b25c504cb265d06488b15a62063da02f1e1 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Fri, 25 Apr 2014 16:45:57 +0200 >Subject: [PATCH] Bug 7673: DB changes - Add permissions > >This patch adds 3 permissions: >- edit_items_restricted >- delete_all_items >- items_batchmod_restricted > >Signed-off-by: Koha Team AMU <koha.aixmarseille@gmail.com> >--- > .../data/mysql/de-DE/mandatory/userpermissions.sql | 3 +++ > .../data/mysql/en/mandatory/userpermissions.sql | 3 +++ > .../data/mysql/es-ES/mandatory/userpermissions.sql | 3 +++ > .../mysql/fr-FR/1-Obligatoire/userpermissions.sql | 3 +++ > .../data/mysql/it-IT/necessari/userpermissions.sql | 3 +++ > .../mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 3 +++ > .../data/mysql/pl-PL/mandatory/userpermissions.sql | 3 +++ > installer/data/mysql/updatedatabase.pl | 22 ++++++++++++++++++++++ > 8 files changed, 43 insertions(+) > >diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >index 0e16281..eee3b65 100644 >--- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql >+++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Katalogdaten bearbeiten (Titel- und Exemplardaten ändern)'), > ( 9, 'fast_cataloging', 'Schnellaufnahmen anlegen'), > ( 9, 'edit_items', 'Exemplare bearbeiten'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Gebühren erlassen'), > (10, 'remaining_permissions', 'Verbleibende Berechtigungen für die Verwaltung von Gebühren'), > (11, 'vendors_manage', 'Lieferanten verwalten'), >@@ -43,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Benutzerfotos einzeln oder im Stapel hochladen'), > (13, 'schedule_tasks', 'Aufgabenplaner verwenden'), > (13, 'items_batchmod', 'Stapelbearbeitung von Exemplaren durchführen'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Stapellöschung von Exemplaren durchführen'), > (13, 'manage_csv_profiles', 'CSV-Profile für Export verwalten'), > (13, 'moderate_tags', 'Von Benutzern vergebene Tags moderieren'), >diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql >index ba5ccd0..e3467b6 100644 >--- a/installer/data/mysql/en/mandatory/userpermissions.sql >+++ b/installer/data/mysql/en/mandatory/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), > ( 9, 'fast_cataloging', 'Fast cataloging'), > ( 9, 'edit_items', 'Edit items'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Write off fines and fees'), > (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), > (11, 'vendors_manage', 'Manage vendors'), >@@ -43,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Upload patron images in a batch or one at a time'), > (13, 'schedule_tasks', 'Schedule tasks to run'), > (13, 'items_batchmod', 'Perform batch modification of items'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Perform batch deletion of items'), > (13, 'manage_csv_profiles', 'Manage CSV export profiles'), > (13, 'moderate_tags', 'Moderate patron tags'), >diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql >index 0564d93..c962000 100644 >--- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql >+++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'), > ( 9, 'fast_cataloging', 'Fast cataloging'), > ( 9, 'edit_items', 'Edit Items'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Write off fines and fees'), > (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), > (11, 'vendors_manage', 'Manage vendors'), >@@ -43,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Upload patron images in a batch or one at a time'), > (13, 'schedule_tasks', 'Schedule tasks to run'), > (13, 'items_batchmod', 'Perform batch modification of items'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Perform batch deletion of items'), > (13, 'manage_csv_profiles', 'Manage CSV export profiles'), > (13, 'moderate_tags', 'Moderate patron tags'), >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >index 31faf15..b13cbd2 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Ajouter et modifier des notices au catalogue'), > ( 9, 'fast_cataloging', 'Catalogage rapide'), > ( 9, 'edit_items', 'Modifier des exemplaires'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Write off fines and fees'), > (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), > (13, 'edit_news', 'Ecrire des nouvelles pour l''OPAC et l''interface professionnelle'), >@@ -47,6 +49,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'moderate_tags', 'Modérer les tags des adhérents'), > (13, 'rotating_collections', 'Gérer les collections tournantes'), > (13, 'items_batchmod', 'Modifier les exemplaires par lot'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Supprimer les exemplaires par lot'), > (13, 'upload_local_cover_images', 'Téléchargement des images de couverture'), > (13, 'manage_patron_lists', 'Add, edit and delete patron lists and their contents'), >diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql >index 5c58e1f..7ff5065 100644 >--- a/installer/data/mysql/it-IT/necessari/userpermissions.sql >+++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Cataloga (crea/modifica dati bibliografici e di copia)'), > ( 9, 'fast_cataloging', 'Catalogazione veloce'), > ( 9, 'edit_items', 'Crea/modifica copie'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Cancellare multe e tariffe'), > (10, 'remaining_permissions', 'Permessi rimanenti per gestione multe e costi'), > (11, 'vendors_manage', 'Crea/modifica fornitori'), >@@ -43,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Aggiorna le foto utente in modalità batch o al momento'), > (13, 'schedule_tasks', 'Schedula i task'), > (13, 'items_batchmod', 'Abilita alla modifica batch delle copie'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Abilita alla cancellazione via batch delle copie'), > (13, 'manage_csv_profiles', 'Gestisci i profili CSV di export'), > (13, 'moderate_tags', 'Modera i tag inseriti dagli utenti'), >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >index dfe5ebb..6a4f00a 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >@@ -31,6 +31,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Endre katalogen (Endre bibliografiske poster og eksemplaropplysninger)'), > ( 9, 'fast_cataloging', 'Hurtigkatalogisering'), > ( 9, 'edit_items', 'Endre eksmeplarer'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Write off fines and fees'), > (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), > (11, 'vendors_manage', 'Administrere leverandører'), >@@ -63,6 +65,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Laste opp bilder av lÃ¥nere enkeltvis eller en masse'), > (13, 'schedule_tasks', 'Planlegge oppgaver som skal kjøres'), > (13, 'items_batchmod', 'Utføre masseendringer av eksemplarer'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Utføre masseslettinger av eksemplarer'), > (13, 'manage_csv_profiles', 'Administrere CSV eksportprofiler'), > (13, 'moderate_tags', 'Behandle tagger fra lÃ¥nere'), >diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >index b9fbee4..818d7c7 100644 >--- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >+++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >@@ -11,6 +11,8 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 9, 'edit_catalogue', 'Edit catalogue'), > ( 9, 'fast_cataloging', 'Szybkie katalogowanie'), > ( 9, 'edit_items', 'Edit Items'), >+ ( 9, 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'), >+ ( 9, 'delete_all_items', 'Delete all items at once'), > (10, 'writeoff', 'Write off fines and fees'), > (10, 'remaining_permissions', 'Remaining permissions for managing fines and fees'), > (11, 'vendors_manage', 'ZarzÄdzanei dostawcami'), >@@ -43,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > (13, 'batch_upload_patron_images', 'Upload patron images in a batch or one at a time'), > (13, 'schedule_tasks', 'Schedule tasks to run'), > (13, 'items_batchmod', 'Perform batch modification of items'), >+ (13, 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'), > (13, 'items_batchdel', 'Perform batch deletion of items'), > (13, 'manage_csv_profiles', 'Manage CSV export profiles'), > (13, 'moderate_tags', 'Moderate patron tags'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index de77bf3..e453a4b 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8613,6 +8613,28 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.17.00.XXX"; >+if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { >+ $dbh->do(q{ >+ INSERT INTO permissions (module_bit, code, description) VALUES ('9', 'edit_items_restricted', 'Limit item modification to barcode, status and note (please note that edit_item is still required)'); >+ }); >+ >+ $dbh->do(q{ >+ INSERT INTO permissions (module_bit, code, description) VALUES ('9', 'delete_all_items', 'Delete all items at once'); >+ }); >+ >+ $dbh->do(q{ >+ INSERT INTO permissions (module_bit, code, description) VALUES ('13', 'items_batchmod_restricted', 'Limit batch item modification to item status (please note that items_batchmod is still required)'); >+ }); >+ >+ # The delete_all_items permission should be added to users having the edit_items permission. >+ $dbh->do(q{ >+ INSERT INTO user_permissions (borrowernumber, module_bit, code) SELECT borrowernumber, module_bit, "delete_all_items" FROM user_permissions WHERE code="edit_items"; >+ }); >+ print "Upgrade to $DBversion done (Bug 7673: Adds new permissions edit_items_restricted, delete_all_items and items_batchmod_restricted)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >2.0.0.rc2
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 7673
:
8714
|
9857
|
10360
|
12102
|
13004
|
16225
|
16239
|
16368
|
16371
|
23266
|
23267
|
23270
|
23271
|
26008
|
26009
|
26704
|
26705
|
26722
|
27631
|
27632
|
27633
|
27634
|
27635
|
27636
|
27637
|
27638
|
27640
|
27641
|
28007
|
28008
|
28009
|
28010
|
28011
|
28012
|
28013
|
28014
|
28015
|
29550
|
30910
|
30911
|
30912
|
30913
|
30914
|
30915
|
30916
|
30917
|
30918
|
30919
|
31010
|
31011
|
31012
|
31013
|
31015
|
31016
|
31017
|
31019
|
32200
|
32201
|
32215
|
32217
|
32219
|
32220
|
32222
|
32224
|
32225
|
32226
|
32227
|
32228
|
32928
|
32962
|
32993
|
33487