INSERT INTO permissions (module_bit, code, description) VALUES
( 1, 'circulate_remaining_permissions', 'Übrige Ausleihberechtigungen'),
- ( 1, 'override_renewals', 'Gesperrte Verlängerungen überschreiben'),
+ ( 1, 'override_renewals', 'Vormerksperren übergehen'),
( 1, 'overdues_report', 'Überfälligkeiten-Report ausführen'),
+ ( 1, 'force_checkout', 'Ausleihsperren übergehen'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
( 1, 'override_renewals', 'Override blocked renewals'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
( 1, 'override_renewals', 'Override blocked renewals'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Fonctions de circulation restantes'),
( 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, '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'),
( 1, 'circulate_remaining_permissions', 'Permessi rimanenti per la circolazione'),
( 1, 'override_renewals', 'Sblocca i rinnovi bloccati'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Øvrige rettigheter for sirkulasjon'),
( 1, 'override_renewals', 'Overstyre blokkerte fornyinger'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
( 1, 'override_renewals', 'Override blocked renewals'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
( 1, 'override_renewals', 'Override blocked renewals'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
( 1, 'circulate_remaining_permissions', 'Remaining circulation permissions'),
( 1, 'override_renewals', 'Override blocked renewals'),
( 1, 'overdues_report', 'Execute overdue items report'),
+ ( 1, 'force_checkout', 'Force checkout if a limitation exists'),
+ ( 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'),
if(CheckVersion($DBversion)) {
$dbh->do("UPDATE marc_subfield_structure SET maxlength=9999 WHERE maxlength IS NULL OR maxlength=0;");
print "Upgrade to $DBversion done (Bug 8018: set 9999 as default max length for subfields)\n";
+ SetVersion ($DBversion);
+}
+
+$DBversion = "3.13.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q{
+ 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, 'manage_restrictions', 'Lift restriction for restricted accounts')
+ });
+ $dbh->do(q{
+ INSERT INTO user_permissions (borrowernumber, module_bit, code)
+ SELECT user_permissions.borrowernumber, 1, 'force_checkout'
+ FROM user_permissions
+ LEFT JOIN borrowers USING(borrowernumber)
+ WHERE borrowers.flags & (1 << 1)
+ });
+ $dbh->do(q{
+ INSERT INTO user_permissions (borrowernumber, module_bit, code)
+ 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 manage_restrictions)\n";
SetVersion($DBversion);
}
<th>Type</th>
<th>Comment</th>
<th>Expiration</th>
- [% IF ( CAN_user_borrowers ) %]
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
<th> </th>
[% END %]
</tr>
</td>
<td>[% d.comment %]</td>
<td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
- [% IF ( CAN_user_borrowers )%]
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
<td>
<a class="remove_restriction" href="/cgi-bin/koha/members/mod_debarment.pl?borrowernumber=[% borrowernumber %]&borrower_debarment_id=[% d.borrower_debarment_id %]&action=del">
Remove
</tbody>
</table>
[% END %]
- <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
- [% IF ( CAN_user_borrowers )%]
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
+ <p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
<form method="post" action="/cgi-bin/koha/members/mod_debarment.pl" class="clearfix">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
<input type="hidden" name="action" value="add" />
<div class="yui-g">
<div id="circ_needsconfirmation" class="dialog alert">
-<h3>Please confirm checkout</h3>
+[% IF CAN_user_circulate_force_checkout %]
+ <h3>Please confirm checkout</h3>
+[% ELSE %]
+ <h3>Cannot check out</h3>
+[% END %]
<ul>
[%IF ( AGE_RESTRICTION ) %]
- <li>Age restriction [% AGE_RESTRICTION %]. Check out anyway?</li>
+ <li>Age restriction [% AGE_RESTRICTION %].
+ [% IF CAN_user_circulate_force_checkout %]
+ Check out anyway?
+ [% END %]
+ </li>
[% END %]
[% IF ( DEBT ) %]
[% END %]
[% IF ( ISSUED_TO_ANOTHER ) %]
- <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]). Check in and check out?</li>
+ <li>Item <i>[% getTitleMessageIteminfo %]</i> ([% getBarcodeMessageIteminfo %]) is checked out to <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% issued_borrowernumber %]">[% issued_firstname %] [% issued_surname %]</a> ([% issued_cardnumber %]).
+ [% IF CAN_user_circulate_force_checkout %]
+ Check in and check out?
+ [% END %]
+ </li>
[% END %]
[% IF ( TOO_MANY ) %]
[% item_notforloan_lib = AuthorisedValues.GetByCode( authvalcode_notforloan, item_notforloan, 0 ) %]
Item is normally not for loan [% IF (item_notforloan_lib) %]([% item_notforloan_lib %])[% END %].
[% END %]
+ [% IF CAN_user_circulate_force_checkout %]
Check out anyway?
+ [% END %]
</li>
[% END %]
[% IF ( USERBLOCKEDOVERDUE ) %]
- <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s). Check out anyway?</li>
+ <li>Patron has [% USERBLOCKEDOVERDUE %] overdue item(s).
+ [% IF CAN_user_circulate_force_checkout %]
+ Check out anyway?
+ [% END %]
+ </li>
[% END %]
[% IF ( ITEM_LOST ) %]
- <li>This item has been lost with a status of "[% ITEM_LOST %]". Check out anyway?</li>
+ <li>This item has been lost with a status of "[% ITEM_LOST %]".
+ [% IF CAN_user_circulate_force_checkout %]
+ Check out anyway?
+ [% END %]
+ </li>
[% END %]
[% IF HIGHHOLDS %]
- <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
+ <li>High demand item. Loan period shortened to [% HIGHHOLDS.duration %] days (due [% HIGHHOLDS.returndate %]). Check out anyway?</li>
[% END %]
</ul>
});
</script>
[% END %]
+
+[% IF CAN_user_circulate_force_checkout or HIGHHOLDS %]
<form method="post" action="/cgi-bin/koha/circ/circulation.pl" autocomplete="off">
[% IF ( RESERVED ) %]
<input type="submit" class="deny" value="No, Don't Check Out (N)" accesskey="n" />
[% END %]
</form>
+[% END %]
</div></div>
[% END %] <!-- NEEDSCONFIRMATION -->
<div class="hint">Enter item barcode:</div>
- [% IF ( NEEDSCONFIRMATION ) %]
+ [% IF NEEDSCONFIRMATION %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" disabled="disabled" />
[% ELSE %]
<input type="text" name="barcode" id="barcode" class="barcode focus" size="14" />
[% IF ( flagloo.key == 'gonenoaddress' ) %]Gone no address:[% 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" />
[% 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 %]
<th>Type</th>
<th>Comment</th>
<th>Expiration</th>
- <th>Remove?</th>
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
+ <th>Remove?</th>
+ [% END %]
</tr>
</thead>
<td>[% d.type %]</td>
<td>[% d.comment %]</td>
<td>[% IF d.expiration %] [% d.expiration | $KohaDates %] [% ELSE %] <i>Indefinite</i> [% END %]</td>
- <td>
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
+ <td>
<input type="checkbox" id="debarment_[% d.borrower_debarment_id %]" name="remove_debarment" value="[% d.borrower_debarment_id %]" />
- </td>
+ </td>
+ [% END %]
</tr>
[% END %]
</tbody>
</table>
[% END %]
+ [% IF CAN_user_borrowers && CAN_user_circulate_manage_restrictions %]
<p><a href="#" id="add_manual_restriction">Add manual restriction</a></p>
<fieldset id="manual_restriction_form">
<input type="hidden" id="add_debarment" name="add_debarment" value="0" />
<a class="cancel" id="cancel_manual_restriction" href="#" onclick="">Cancel</a>
</p>
</fieldset>
+ [% END %]
</fieldset>
[% END %]