Bugzilla – Attachment 16034 Details for
Bug 6898
circulation librarians can't run overdues without reports permissions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6898 - circulation librarians can't run overdues without reports permissions
Bug-6898---circulation-librarians-cant-run-overdue.patch (text/plain), 11.33 KB, created by
Jonathan Druart
on 2013-03-11 15:34:34 UTC
(
hide
)
Description:
Bug 6898 - circulation librarians can't run overdues without reports permissions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-03-11 15:34:34 UTC
Size:
11.33 KB
patch
obsolete
>From 36d82b4e5d0aa6a957a9dd59ec0825ff389b8459 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Fri, 10 Feb 2012 10:43:29 -0500 >Subject: [PATCH] Bug 6898 - circulation librarians can't run overdues without > reports permissions > >This patch adds a new user permission overdues_report for the circulation module, and requires this permission to run the overdue items >report, rather than requiring full reports permissions. > >Test plan : >With a user with permissions circulate_remaining_permissions : >- Add overdues_report permission to user >- Go to circulation home >=> you see "Overdues" link >- Clik on it >=> you are allowed to access and use this page >- Remove overdues_report permission to user >- Go to circulation home >=> you do not see "Overdues" link >- Edit URL : <server>/cgi-bin/koha/circ/overdue.pl >=> you are not allowed to access this page >- Go to main page >=> you don't have access to reports module > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Fridolyn SOMERS <fridolyn.somers@biblibre.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > circ/overdue.pl | 2 +- > installer/data/mysql/de-DE/mandatory/userpermissions.sql | 1 + > installer/data/mysql/en/mandatory/userpermissions.sql | 1 + > installer/data/mysql/es-ES/mandatory/userpermissions.sql | 1 + > installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql | 1 + > installer/data/mysql/it-IT/necessari/userpermissions.sql | 1 + > installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 1 + > installer/data/mysql/pl-PL/mandatory/userpermissions.sql | 1 + > .../data/mysql/ru-RU/mandatory/permissions_and_user_flags.sql | 1 + > .../data/mysql/uk-UA/mandatory/permissions_and_user_flags.sql | 1 + > installer/data/mysql/updatedatabase.pl | 6 ++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt | 2 +- > 12 files changed, 17 insertions(+), 2 deletions(-) > >diff --git a/circ/overdue.pl b/circ/overdue.pl >index cef345c..8fed8c8 100755 >--- a/circ/overdue.pl >+++ b/circ/overdue.pl >@@ -60,7 +60,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > query => $input, > type => "intranet", > authnotrequired => 0, >- flagsrequired => { reports => 1, circulate => "circulate_remaining_permissions" }, >+ flagsrequired => { circulate => "overdues_report" }, > debug => 1, > } > ); >diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >index ec5a22a..f203a8d 100644 >--- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql >+++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >@@ -1,6 +1,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Ãbrige Ausleihberechtigungen'), > ( 1, 'override_renewals', 'Gesperrte Verlängerungen überschreiben'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Ãbrige Administrationsberechtigungen'), > ( 3, 'manage_circ_rules', 'Ausleihkonditionen verwalten'), > ( 6, 'place_holds', 'Vormerkungen für Benutzer setzen'), >diff --git a/installer/data/mysql/en/mandatory/userpermissions.sql b/installer/data/mysql/en/mandatory/userpermissions.sql >index 070e8f5..8577ef2 100644 >--- a/installer/data/mysql/en/mandatory/userpermissions.sql >+++ b/installer/data/mysql/en/mandatory/userpermissions.sql >@@ -1,6 +1,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), > ( 1, 'override_renewals', 'Override blocked renewals'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'manage circulation rules'), > ( 6, 'place_holds', 'Place holds for patrons'), >diff --git a/installer/data/mysql/es-ES/mandatory/userpermissions.sql b/installer/data/mysql/es-ES/mandatory/userpermissions.sql >index 070e8f5..8577ef2 100644 >--- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql >+++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql >@@ -1,6 +1,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), > ( 1, 'override_renewals', 'Override blocked renewals'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'manage circulation rules'), > ( 6, 'place_holds', 'Place holds for patrons'), >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >index 3147bed..3c57a81 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >@@ -1,6 +1,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'), > ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'), >+ ( 1, 'overdues_report', 'Executer le rapport de retards'), > ( 3, 'parameters_remaining_permissions', 'Paramètres du système restants'), > ( 3, 'manage_circ_rules', 'Gestion des règles de circulation'), > ( 6, 'place_holds', 'Réserver pour des adhérents'), >diff --git a/installer/data/mysql/it-IT/necessari/userpermissions.sql b/installer/data/mysql/it-IT/necessari/userpermissions.sql >index cf5424e..31e6e18 100644 >--- a/installer/data/mysql/it-IT/necessari/userpermissions.sql >+++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql >@@ -3,6 +3,7 @@ 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'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Permessi rimanenti'), > ( 3, 'manage_circ_rules', 'Gestisci regole circolazione'), > ( 6, 'place_holds', 'Fai prenotazioni per gli utenti'), >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >index 36c03f3..7977865 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >@@ -21,6 +21,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Ãvrige rettigheter for sirkulasjon'), > ( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Ãvrige rettigheter knyttet til systempreferanser'), > ( 3, 'manage_circ_rules', 'Endre sirkulasjonsregler'), > ( 6, 'place_holds', 'Foreta reservering for lÃ¥nere'), >diff --git a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >index 1165af1..02b2551 100644 >--- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >+++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >@@ -1,6 +1,7 @@ > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), > ( 1, 'override_renewals', 'Override blocked renewals'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'manage circulation rules'), > ( 6, 'place_holds', 'Place holds for patrons'), >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 00d6538..868c3c0 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,7 @@ TRUNCATE permissions; > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), > ( 1, 'override_renewals', 'Override blocked renewals'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'manage circulation rules'), > ( 6, 'place_holds', 'Place holds for patrons'), >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 188a146..8d0126b 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,7 @@ TRUNCATE permissions; > INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'), > ( 1, 'override_renewals', 'Override blocked renewals'), >+ ( 1, 'overdues_report', 'Execute overdue items report'), > ( 3, 'parameters_remaining_permissions', 'Remaining system parameters permissions'), > ( 3, 'manage_circ_rules', 'manage circulation rules'), > ( 6, 'place_holds', 'Place holds for patrons'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 041040a..f49cea1 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6476,6 +6476,12 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.11.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT INTO permissions ( module_bit, code, description ) VALUES ( '1', 'overdues_report', 'Execute overdue items report' )"); >+ print "Upgrade to $DBversion done ( Add circ permission overdues_report )\n"; >+ SetVersion($DBversion); >+} > > =head1 FUNCTIONS > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >index 631158f..cb0662a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt >@@ -40,7 +40,7 @@ > <li> <a href="/cgi-bin/koha/circ/waitingreserves.pl" title="holds waiting for patron pickup">Holds awaiting pickup</a></li> > <li> <a href="/cgi-bin/koha/circ/reserveratios.pl">Hold ratios</a></li> > <li> <a href="/cgi-bin/koha/circ/transferstoreceive.pl" title="transfers to receive at your library">Transfers to receive</a></li> >- [% IF ( CAN_user_reports_execute_reports ) %]<li> <a href="/cgi-bin/koha/circ/overdue.pl">Overdues</a> >+ [% IF ( CAN_user_circulate_overdues_report ) %]<li> <a href="/cgi-bin/koha/circ/overdue.pl">Overdues</a> > - <b>Warning:</b> This report is very resource intensive on > systems with large numbers of overdue items.</li>[% END %] > <li> <a href="/cgi-bin/koha/circ/branchoverdues.pl">Overdues with fines</a> - Limited to your library. See report help for other details.</li> >-- >1.7.10.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 6898
:
7568
|
8233
|
14680
|
15162
|
15939
|
15940
|
15946
|
15947
|
15948
|
15966
|
15974
|
15975
|
16034
|
16035
|
16207
|
16208
|
18670
|
19434
|
19541