From b3feb54ee073b99565a4e25fd397ff6ed5a0dc78 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Wed, 16 Jun 2010 16:38:31 +1200 Subject: [PATCH] Cherry-picked onto master, fixing conflicts: MT 1816: Granular permissions for the serials module Signed-off-by: Henri-Damien LAURENT Conflicts: installer/data/mysql/en/mandatory/userpermissions.sql installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql installer/data/mysql/updatedatabase30.pl koha-tmpl/intranet-tmpl/prog/en/includes/header.inc koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-home.tmpl serials/member-search.pl serials/serials-edit.pl serials/subscription-add.pl serials/subscription-bib-search.pl serials/subscription-detail.pl Signed-off-by: Galen Charlton --- .../mysql/en/mandatory/userpermissions.sql | 8 +++ .../fr-FR/1-Obligatoire/userpermissions.sql | 8 +++ installer/data/mysql/updatedatabase.pl | 18 ++++++ .../intranet-tmpl/prog/en/includes/header.inc | 1 + .../prog/en/includes/mainmenu.inc | 4 ++ .../prog/en/includes/serials-menu.inc | 15 ++++- .../prog/en/includes/serials-toolbar.inc | 56 +++++++++++++------ .../prog/en/modules/serials/serials-home.tmpl | 2 +- .../en/modules/serials/subscription-add.tmpl | 11 +++- kohaversion.pl | 2 +- serials/acqui-search-result.pl | 2 +- serials/acqui-search.pl | 2 +- serials/checkexpiration.pl | 2 +- serials/claims.pl | 2 +- serials/member-search.pl | 4 +- serials/routing-preview.pl | 4 +- serials/routing.pl | 2 +- serials/serial-issues.pl | 2 +- serials/serials-collection.pl | 2 +- serials/serials-edit.pl | 13 +++-- serials/serials-home.pl | 2 +- serials/statecollection.pl | 2 +- serials/subscription-add.pl | 8 ++- serials/subscription-bib-search.pl | 17 ++++-- serials/subscription-detail.pl | 22 +++++++- serials/subscription-renew.pl | 2 +- serials/viewalerts.pl | 2 +- 27 files changed, 166 insertions(+), 49 deletions(-) diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql index 287d9da0a6..ec61ea0c50 100644 --- a/installer/data/mysql/en/mandatory/userpermissions.sql +++ b/installer/data/mysql/en/mandatory/userpermissions.sql @@ -36,6 +36,14 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'manage_csv_profiles', 'Manage CSV export profiles'), (13, 'moderate_tags', 'Moderate patron tags'), (13, 'rotating_collections', 'Manage rotating collections'), + (15, 'check_expiration', 'Check the expiration of a serial'), + (15, 'claim_serials', 'Claim missing serials'), + (15, 'create_subscription', 'Create a new subscription'), + (15, 'delete_subscription', 'Delete an existing subscription'), + (15, 'edit_subscription', 'Edit an existing subscription'), + (15, 'receive_serials', 'Serials receiving'), + (15, 'renew_subscription', 'Renew a subscription'), + (15, 'routing', 'Routing'), (16, 'execute_reports', 'Execute SQL reports'), (16, 'create_reports', 'Create SQL Reports') ; diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql index a300256c66..c86672ae98 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql @@ -36,6 +36,14 @@ INSERT INTO permissions (module_bit, code, description) VALUES (13, 'rotating_collections', 'Gérer les collections tournantes'), (13, 'batchmod', 'Modifier les exemplaires par lot'), (13, 'batchdel', 'Supprimer les exemplaires par lot'), + (15, 'check_expiration', 'Check the expiration of a serial'), + (15, 'claim_serials', 'Claim missing serials'), + (15, 'create_subscription', 'Create a new subscription'), + (15, 'delete_subscription', 'Delete an existing subscription'), + (15, 'edit_subscription', 'Edit an existing subscription'), + (15, 'receive_serials', 'Serials receiving'), + (15, 'renew_subscription', 'Renew a subscription'), + (15, 'routing', 'Routing'), (16, 'execute_reports', 'Lancer les rapports SQL'), (16, 'create_reports', 'Créer les rapports SQL Reports') diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1d9065675a..b65bdd1a60 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3624,6 +3624,24 @@ INSERT INTO permissions (module_bit, code, description) VALUES SetVersion ($DBversion); } +$DBversion = "3.01.00.137"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(" + INSERT INTO permissions (module_bit, code, description) VALUES + (15, 'check_expiration', 'Check the expiration of a serial'), + (15, 'claim_serials', 'Claim missing serials'), + (15, 'create_subscription', 'Create a new subscription'), + (15, 'delete_subscription', 'Delete an existing subscription'), + (15, 'edit_subscription', 'Edit an existing subscription'), + (15, 'receive_serials', 'Serials receiving'), + (15, 'renew_subscription', 'Renew a subscription'), + (15, 'routing', 'Routing'); + "); + print "Upgrade to $DBversion done (adding granular permissions for serials)"; + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc index 95ce8dd83c..1dd18843c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/header.inc @@ -1,5 +1,6 @@
Your cart is empty.
+<<<<<<< HEAD:koha-tmpl/intranet-tmpl/prog/en/includes/header.inc