Fix for Bug 2970, Create a permission for modifying holds priority
Adding two new granular permissions under 'reserveforothers,' place_holds and modify_holds_priority. If a user does not have modify_holds_priority permission, the option to change the priority of a hold is hidden. Revised patch includes changes to mandatory data files including properly translated fr-FR version. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
a98e3da534
commit
e31b7bd9a5
|
|
@ -4,7 +4,7 @@ INSERT INTO `userflags` VALUES(2,'catalogue','View Catalog (Librarian Interface)
|
|||
INSERT INTO `userflags` VALUES(3,'parameters','Set Koha system parameters',0);
|
||||
INSERT INTO `userflags` VALUES(4,'borrowers','Add or modify borrowers',0);
|
||||
INSERT INTO `userflags` VALUES(5,'permissions','Set user permissions',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Reserve books for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Place and modify holds for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(7,'borrow','Borrow books',1);
|
||||
INSERT INTO `userflags` VALUES(9,'editcatalogue','Edit Catalog (Modify bibliographic/holdings data)',0);
|
||||
INSERT INTO `userflags` VALUES(10,'updatecharges','Update borrower charges',0);
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
( 6, 'place_holds', 'Place holds for patrons'),
|
||||
( 6, 'modify_holds_priority', 'Modify holds priority'),
|
||||
( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
|
||||
( 9, 'fast_cataloging', 'Fast cataloging'),
|
||||
(11, 'vendors_manage', 'Manage vendors'),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ INSERT INTO `userflags` VALUES(2,'catalogue','Consultation du catalogue (interfa
|
|||
INSERT INTO `userflags` VALUES(3,'parameters','Définition des paramètres de l''application',0);
|
||||
INSERT INTO `userflags` VALUES(4,'borrowers','Gestion des lecteurs',0);
|
||||
INSERT INTO `userflags` VALUES(5,'permissions','Définition des habilitations',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Gestion des réservations',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Ajout et modifications des réservations des adhérents',0);
|
||||
INSERT INTO `userflags` VALUES(7,'borrow','Circulation (inutile normalement)',1);
|
||||
INSERT INTO `userflags` VALUES(9,'editcatalogue','fonctions de catalogage',0);
|
||||
INSERT INTO `userflags` VALUES(10,'updatecharges','Gestion des pénalités financières',0);
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
( 6, 'place_holds', 'Réserver pour des adhérents'),
|
||||
( 6, 'modify_holds_priority', 'Modifier la priorité des réservations'),
|
||||
( 9, 'edit_catalogue', 'Editer le catalogue'),
|
||||
( 9, 'fast_cataloging', 'Catalogage rapide'),
|
||||
(13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ INSERT INTO `userflags` VALUES(2,'catalogue','View Catalog (Librarian Interface)
|
|||
INSERT INTO `userflags` VALUES(3,'parameters','Set Koha system parameters',0);
|
||||
INSERT INTO `userflags` VALUES(4,'borrowers','Add or modify borrowers',0);
|
||||
INSERT INTO `userflags` VALUES(5,'permissions','Set user permissions',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Reserve books for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(6,'reserveforothers','Place and modify holds for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(7,'borrow','Borrow books',1);
|
||||
INSERT INTO `userflags` VALUES(9,'editcatalogue','Edit Catalog (Modify bibliographic/holdings data)',0);
|
||||
INSERT INTO `userflags` VALUES(10,'updatecharges','Update borrower charges',0);
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
( 6, 'place_holds', 'Place holds for patrons'),
|
||||
( 6, 'modify_holds_priority', 'Modify holds priority'),
|
||||
( 9, 'edit_catalogue', 'Edit catalogue'),
|
||||
( 9, 'fast_cataloging', 'Szybkie katalogowanie'),
|
||||
(11, 'vendors_manage', 'Zarządzanei dostawcami'),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ INSERT INTO `userflags` VALUES(2, 'catalogue', 'Просмотр ката
|
|||
INSERT INTO `userflags` VALUES(3, 'parameters', 'Установка системных настроек Koha',0);
|
||||
INSERT INTO `userflags` VALUES(4, 'borrowers', 'Внесение и изменение посетителей',0);
|
||||
INSERT INTO `userflags` VALUES(5, 'permissions', 'Установка привилегий пользователя',0);
|
||||
INSERT INTO `userflags` VALUES(6, 'reserveforothers','Резервирование книжек для посетителей',0);
|
||||
INSERT INTO `userflags` VALUES(6, 'reserveforothers','Place and modify holds for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(7, 'borrow', 'Заем книг',1);
|
||||
INSERT INTO `userflags` VALUES(9, 'editcatalogue', 'Изменение каталога (изменение библиографических/локальных данных)',0);
|
||||
INSERT INTO `userflags` VALUES(10,'updatecharges', 'Обновление оплат пользователей',0);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
TRUNCATE permissions;
|
||||
|
||||
INSERT INTO permissions (module_bit, code, description) VALUES
|
||||
( 6, 'place_holds', 'Place holds for patrons'),
|
||||
( 6, 'modify_holds_priority', 'Modify holds priority'),
|
||||
(13, 'edit_news', 'Написание новостей для электронного каталога и интерфейса библиотекарей'),
|
||||
(13, 'label_creator', 'Создание печатных наклеек и штрихкодов из каталога и с данными о пользователях'),
|
||||
(13, 'edit_calendar', 'Определение дней, когда библиотека закрыта'),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ INSERT INTO `userflags` VALUES(2, 'catalogue', 'Перегляд ката
|
|||
INSERT INTO `userflags` VALUES(3, 'parameters', 'Встановлення системних налаштувань Koha',0);
|
||||
INSERT INTO `userflags` VALUES(4, 'borrowers', 'Внесення та зміна відвідувачів',0);
|
||||
INSERT INTO `userflags` VALUES(5, 'permissions', 'Встановлення привілеїв користувача',0);
|
||||
INSERT INTO `userflags` VALUES(6, 'reserveforothers','Резервування книжок для відвідувачів',0);
|
||||
INSERT INTO `userflags` VALUES(6, 'reserveforothers','Place and modify holds for patrons',0);
|
||||
INSERT INTO `userflags` VALUES(7, 'borrow', 'Випозичання книжок',1);
|
||||
INSERT INTO `userflags` VALUES(9, 'editcatalogue', 'Редагування каталогу (зміна бібліографічних/локальних даних)',0);
|
||||
INSERT INTO `userflags` VALUES(10,'updatecharges', 'Оновлення сплат користувачів',0);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
INSERT INTO permissions (module_bit, code, description) VALUES
|
||||
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
|
||||
( 1, 'override_renewals', 'Override blocked renewals'),
|
||||
( 6, 'place_holds', 'Place holds for patrons'),
|
||||
( 6, 'modify_holds_priority', 'Modify holds priority'),
|
||||
( 9, 'edit_catalogue', 'Edit catalog (Modify bibliographic/holdings data)'),
|
||||
( 9, 'fast_cataloging', 'Fast cataloging'),
|
||||
(11, 'vendors_manage', 'Manage vendors'),
|
||||
(11, 'contracts_manage', 'Manage contracts'),
|
||||
(11, 'period_manage', 'Manage periods'),
|
||||
(11, 'budget_manage', 'Manage budgets'),
|
||||
(11, 'budget_modify', 'Modify budget (can''t create lines, but can modify existing ones)'),
|
||||
(11, 'planning_manage', 'Manage budget plannings'),
|
||||
(11, 'order_manage', 'Manage orders & basket'),
|
||||
(11, 'group_manage', 'Manage orders & basketgroups'),
|
||||
(11, 'order_receive', 'Manage orders & basket'),
|
||||
(11, 'budget_add_del', 'Add and delete budgets (but cant modify budgets)'),
|
||||
(13, 'edit_news', 'Write news for the OPAC and staff interfaces'),
|
||||
(13, 'label_creator', 'Create printable labels and barcodes from catalog and patron data'),
|
||||
(13, 'edit_calendar', 'Define days when the library is closed'),
|
||||
(13, 'moderate_comments', 'Moderate patron comments'),
|
||||
(13, 'edit_notices', 'Define notices'),
|
||||
(13, 'edit_notice_status_triggers', 'Set notice/status triggers for overdue items'),
|
||||
(13, 'view_system_logs', 'Browse the system logs'),
|
||||
(13, 'inventory', 'Perform inventory (stocktaking) of your catalog'),
|
||||
(13, 'stage_marc_import', 'Stage MARC records into the reservoir'),
|
||||
(13, 'manage_staged_marc', 'Managed staged MARC records, including completing and reversing imports'),
|
||||
(13, 'export_catalog', 'Export bibliographic and holdings data'),
|
||||
(13, 'import_patrons', 'Import patron data'),
|
||||
(13, 'delete_anonymize_patrons', 'Delete old borrowers and anonymize circulation history (deletes borrower reading history)'),
|
||||
(13, 'batch_upload_patron_images', 'Upload patron images in batch or one at a time'),
|
||||
(13, 'schedule_tasks', 'Schedule tasks to run'),
|
||||
(13, 'batchmod', 'Perform batch modification of items'),
|
||||
(13, 'batchdel', 'Perform batch deletion of items'),
|
||||
(13, 'manage_csv_profiles', 'Manage CSV export profiles'),
|
||||
(13, 'moderate_tags', 'Moderate patron tags'),
|
||||
(13, 'rotating_collections', 'Manage rotating collections'),
|
||||
(16, 'execute_reports', 'Execute SQL reports'),
|
||||
(16, 'create_reports', 'Create SQL Reports')
|
||||
;
|
||||
|
|
@ -0,0 +1 @@
|
|||
Detailed staff user permissions
|
||||
|
|
@ -3500,6 +3500,18 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = "3.01.00.123";
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
$dbh->do("INSERT INTO `permissions` (`module_bit`, `code`, `description`) VALUES
|
||||
(6, 'place_holds', 'Place holds for patrons')");
|
||||
$dbh->do("INSERT INTO `permissions` (`module_bit`, `code`, `description`) VALUES
|
||||
(6, 'modify_holds_priority', 'Modify holds priority')");
|
||||
$dbh->do("UPDATE `userflags` SET `flagdesc` = 'Place and modify holds for patrons' WHERE `flag` = 'reserveforothers'");
|
||||
print "Upgrade to $DBversion done (Add granular permission for holds modification and update description of reserveforothers permission)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
|
||||
=item DropAllForeignKeys($table)
|
||||
|
||||
Drop all foreign keys of the table $table
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ function checkMultiHold() {
|
|||
</li>
|
||||
<!-- TMPL_UNLESS NAME="multi_hold" -->
|
||||
<li>
|
||||
<span class="label">Priority:</span>
|
||||
<span class="label">Priority:</span>
|
||||
<strong><!-- TMPL_VAR Name="fixedRank" --></strong>
|
||||
</li>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
|
|
@ -495,7 +495,7 @@ function checkMultiHold() {
|
|||
<img src="<!-- TMPL_VAR name="imageurl" -->" alt="<!-- TMPL_VAR NAME="itypename" -->" title="<!-- TMPL_VAR NAME="itypename" -->" />
|
||||
</td>
|
||||
<!-- /TMPL_UNLESS -->
|
||||
<td><!-- TMPL_VAR NAME="rank" --></td>
|
||||
<td><!-- TMPL_VAR NAME="rank" --></td>
|
||||
<td>
|
||||
<!-- TMPL_IF NAME="alreadyres" -->
|
||||
<ul>
|
||||
|
|
@ -561,8 +561,8 @@ function checkMultiHold() {
|
|||
<caption><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=<!-- TMPL_VAR NAME="biblionumber" -->"><!-- TMPL_VAR NAME="title" ESCAPE="html" --></a></caption>
|
||||
<!-- /TMPL_IF -->
|
||||
<tr>
|
||||
<th>Priority</th>
|
||||
<th> </th>
|
||||
<!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" --><th>Priority</th><!-- TMPL_ELSE --><th>Delete?</th><!-- /TMPL_IF -->
|
||||
<th> </th>
|
||||
<th>Patron</th>
|
||||
<th>Notes</th>
|
||||
<th>Date</th>
|
||||
|
|
@ -581,9 +581,9 @@ function checkMultiHold() {
|
|||
<!-- TMPL_IF Name="wait" -->
|
||||
<option value="W" selected="selected">Waiting</option>
|
||||
<!-- /TMPL_IF -->
|
||||
<!-- TMPL_LOOP Name="optionloop" -->
|
||||
<!-- TMPL_IF Name="selected" --><option value="<!-- TMPL_VAR NAME="num" -->" selected="selected"><!-- TMPL_VAR NAME="num" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="num" -->"><!-- TMPL_VAR NAME="num" --></option><!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP -->
|
||||
<!-- TMPL_IF NAME="CAN_user_reserveforothers_modify_holds_priority" --><!-- TMPL_LOOP Name="optionloop" -->
|
||||
<!-- TMPL_IF Name="selected" --><option value="<!-- TMPL_VAR NAME="num" -->" selected="selected"><!-- TMPL_VAR NAME="num" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="num" -->"><!-- TMPL_VAR NAME="num" --></option><!-- /TMPL_IF -->
|
||||
<!-- /TMPL_LOOP --><!-- TMPL_ELSE --><option value=""></option><!-- /TMPL_IF -->
|
||||
<option value="del">del</option>
|
||||
</select>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
|
|||
query => $input,
|
||||
type => "intranet",
|
||||
authnotrequired => 0,
|
||||
flagsrequired => { reserveforothers => 1 },
|
||||
flagsrequired => { reserveforothers => 'place_holds' },
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue