Bugzilla – Attachment 21661 Details for
Bug 10863
Add 2 circulation permissions: force_checkout and lift_restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10863: Rename lift_restriction with manage_restrictions
Bug-10863-Rename-liftrestriction-with-managerestri.patch (text/plain), 15.59 KB, created by
Jonathan Druart
on 2013-09-30 14:18:43 UTC
(
hide
)
Description:
Bug 10863: Rename lift_restriction with manage_restrictions
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-09-30 14:18:43 UTC
Size:
15.59 KB
patch
obsolete
>From e4e11994ab1fd8fe42973db303d93356378ca474 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 30 Sep 2013 16:15:34 +0200 >Subject: [PATCH] Bug 10863: Rename lift_restriction with manage_restrictions > >The pref manage_restrictions now takes into account "Lost card" and >"Gone no address" restrictions. > >Test plan: >- log in with a user with manage_restrictions permission >- verify you can set/unset restrictions when editing a patron >- log in with a user without manage_restrictions permission >- verify you cannot set/unset restrictions when editing a patron >--- > .../data/mysql/de-DE/mandatory/userpermissions.sql | 2 +- > .../data/mysql/en/mandatory/userpermissions.sql | 2 +- > .../data/mysql/es-ES/mandatory/userpermissions.sql | 2 +- > .../mysql/fr-FR/1-Obligatoire/userpermissions.sql | 2 +- > .../data/mysql/it-IT/necessari/userpermissions.sql | 2 +- > .../mysql/nb-NO/1-Obligatorisk/userpermissions.sql | 2 +- > .../data/mysql/pl-PL/mandatory/userpermissions.sql | 2 +- > .../ru-RU/mandatory/permissions_and_user_flags.sql | 2 +- > .../uk-UA/mandatory/permissions_and_user_flags.sql | 2 +- > installer/data/mysql/updatedatabase.pl | 6 +++--- > .../prog/en/modules/circ/circulation.tt | 2 +- > .../prog/en/modules/members/memberentrygen.tt | 18 ++++++++++++++---- > .../prog/en/modules/members/moremember.tt | 2 +- > 13 files changed, 28 insertions(+), 18 deletions(-) > >diff --git a/installer/data/mysql/de-DE/mandatory/userpermissions.sql b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >index 9276ac7..87db2c3 100644 >--- a/installer/data/mysql/de-DE/mandatory/userpermissions.sql >+++ b/installer/data/mysql/de-DE/mandatory/userpermissions.sql >@@ -3,7 +3,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Vormerksperren übergehen'), > ( 1, 'overdues_report', 'Ãberfälligkeiten-Report ausführen'), > ( 1, 'force_checkout', 'Ausleihsperren übergehen'), >- ( 1, 'lift_restriction', 'Kontosperre "Gesperrt" aufheben'), >+ ( 1, 'manage_restrictions', 'Kontosperre "Gesperrt" aufheben'), > ( 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 cf0eb54..5509771 100644 >--- a/installer/data/mysql/en/mandatory/userpermissions.sql >+++ b/installer/data/mysql/en/mandatory/userpermissions.sql >@@ -3,7 +3,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Override blocked renewals'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 cf0eb54..5509771 100644 >--- a/installer/data/mysql/es-ES/mandatory/userpermissions.sql >+++ b/installer/data/mysql/es-ES/mandatory/userpermissions.sql >@@ -3,7 +3,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Override blocked renewals'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 acd8436..6a76d5b 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/userpermissions.sql >@@ -3,7 +3,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Outrepasser les limites de renouvellement'), > ( 1, 'overdues_report', 'Executer le rapport de retards'), > ( 1, 'force_checkout', 'Forcer le prêt si une limitation existe'), >- ( 1, 'lift_restriction', 'Lever la suspenssion d\'un utilisateur suspendu'), >+ ( 1, 'manage_restrictions', 'Gérer les suspensions d\'un utilisateur'), > ( 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 bff76ac..3bf7d65 100644 >--- a/installer/data/mysql/it-IT/necessari/userpermissions.sql >+++ b/installer/data/mysql/it-IT/necessari/userpermissions.sql >@@ -5,7 +5,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Sblocca i rinnovi bloccati'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 88051d3..ecf39f1 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/userpermissions.sql >@@ -23,7 +23,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 c7595f5..c1431bb 100644 >--- a/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >+++ b/installer/data/mysql/pl-PL/mandatory/userpermissions.sql >@@ -3,7 +3,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Override blocked renewals'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 d315f52..b754c46 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 >@@ -29,7 +29,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Override blocked renewals'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 2dc23a0..8caf716 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 >@@ -29,7 +29,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES > ( 1, 'override_renewals', 'Override blocked renewals'), > ( 1, 'overdues_report', 'Execute overdue items report'), > ( 1, 'force_checkout', 'Force checkout if a limitation exists'), >- ( 1, 'lift_restriction', 'Lift restriction for restricted accounts'), >+ ( 1, 'manage_restrictions', 'Manage restrictions for accounts'), > ( 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 87a2d9d..a2e7506 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -7161,7 +7161,7 @@ if ( CheckVersion($DBversion) ) { > INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'force_checkout', 'Force checkout if a limitation exists') > }); > $dbh->do(q{ >- INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'lift_restriction', 'Lift restriction for restricted accounts') >+ INSERT INTO permissions (module_bit, code, description) VALUES ( 1, 'manage_restrictions', 'Lift restriction for restricted accounts') > }); > $dbh->do(q{ > INSERT INTO user_permissions (borrowernumber, module_bit, code) >@@ -7172,13 +7172,13 @@ if ( CheckVersion($DBversion) ) { > }); > $dbh->do(q{ > INSERT INTO user_permissions (borrowernumber, module_bit, code) >- SELECT user_permissions.borrowernumber, 1, 'lift_restriction' >+ SELECT user_permissions.borrowernumber, 1, 'manage_restrictions' > FROM user_permissions > LEFT JOIN borrowers USING(borrowernumber) > WHERE borrowers.flags & (1 << 1) > }); > >- print "Upgrade to $DBversion done (Bug 10863 - Add permission force_checkout and lift_restriction)\n"; >+ print "Upgrade to $DBversion done (Bug 10863 - Add permission force_checkout and manage_restrictions)\n"; > SetVersion($DBversion); > } > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 46786ae..91ca0da 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -583,7 +583,7 @@ No patron matched <span class="ex">[% message %]</span> > [% IF ( userdebarred ) %] > <li class="blocker"> > <span class="circ-hlt"> Restricted:</span> Patron's account is restricted [% IF (userdebarreddate ) %] until [% userdebarreddate %] [% END %] [% IF (debarredcomment ) %] with the comment "[% debarredcomment %]"[% END %] >- [% IF CAN_user_circulate_lift_restriction %] >+ [% IF CAN_user_circulate_manage_restrictions %] > <form class="inline compact" action="/cgi-bin/koha/members/setstatus.pl" method="post"> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="destination" value="circ" /> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >index 08ab4b4..2d31d89 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt >@@ -1145,6 +1145,7 @@ > [% IF ( flagloo.key == 'debarred' ) %]Restricted:[% END %] > [% IF ( flagloo.key == 'lost' ) %]Lost card:[% END %] > </label> >+ [% IF CAN_user_circulate_manage_restrictions %] > <label for="yes[% flagloo.name %]">Yes </label> > [% IF ( flagloo.yes ) %] > <input type="radio" id="yes[% flagloo.name %]" name="[% flagloo.name %]" value="1" checked="checked" /> >@@ -1157,12 +1158,15 @@ > [% ELSE %] > <input type="radio" id="no[% flagloo.name %]" name="[% flagloo.name %]" value="0" /> > [% END %] >+ [% ELSE %] >+ [% IF flagloo.yes %]Yes[% ELSE %]No[% END %] >+ [% END %] > > </li> > [% END %] > <li> > <label for="yesdebarred" class="radio">Restricted: </label> >- [% IF CAN_user_circulate_lift_restriction %] >+ [% IF CAN_user_circulate_manage_restrictions %] > [% IF ( debarred ) %] > <label for="yesdebarred">Yes </label> > <input type="radio" id="yesdebarred" name="debarred" value="1" checked="checked"/> >@@ -1179,15 +1183,21 @@ > <span class="hint">(optional)</span> </span> > [% ELSE %] > [% IF ( debarred ) %] >- Yes, until [% datedebarred %] >+ Yes[% IF datedebarred %], until [% datedebarred %][% END %] > [% ELSE %] > No > [% END %] > [% END %] > </li> > <li> >- <label for="debarredcomment" class="radio">Comment:</label> >- <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3">[% debarredcomment %]</textarea> >+ [% IF CAN_user_circulate_manage_restrictions || debarredcomment %] >+ <label for="debarredcomment" class="radio">Comment:</label> >+ [% IF CAN_user_circulate_manage_restrictions %] >+ <textarea id="debarredcomment" name="debarredcomment" cols="55" rows="3">[% debarredcomment %]</textarea> >+ [% ELSE %] >+ [% debarredcomment %] >+ [% END %] >+ [% END %] > </li> > > </ol> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 5eb37c1..3e9a672 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -194,7 +194,7 @@ function validate1(date) { > <ul> > [% IF ( userdebarred ) %] > <li class="blocker">Patron is restricted[% IF ( userdebarreddate ) %] until [% userdebarreddate%] [% IF (debarredcomment ) %]([% debarredcomment %])[% END %][% END %] >- [% IF CAN_user_circulate_lift_restriction %] >+ [% IF CAN_user_circulate_manage_restrictions %] > <form class="inline compact" action="/cgi-bin/koha/members/setdebar.pl" method="post"> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="submit" value="Lift restriction" /> >-- >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 10863
:
20948
|
20981
|
21042
|
21043
|
21201
|
21203
|
21204
|
21247
|
21248
|
21249
|
21542
|
21661
|
22717
|
23254
|
23540