Bug 23681: Add modify_patron_restrictions permission
This patch adds a new "modify_patron_restrictions" permission Sponsored-by: Loughborough University Signed-off-by: Benjamin Veasey <B.T.Veasey@lboro.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
8c07d4938e
commit
2985aa9883
5 changed files with 27 additions and 8 deletions
|
@ -18,15 +18,15 @@ if ( CheckVersion( $DBversion ) ) {
|
|||
('SUSPENSION', 'Suspension', 1, 0),
|
||||
('DISCHARGE', 'Discharge', 1, 0);
|
||||
|);
|
||||
$dbh->do( q|
|
||||
ALTER TABLE borrower_debarments
|
||||
MODIFY COLUMN type varchar(50) NOT NULL
|
||||
| );
|
||||
$dbh->do( q|
|
||||
ALTER TABLE borrower_debarments
|
||||
ADD CONSTRAINT borrower_debarments_ibfk_2 FOREIGN KEY (type) REFERENCES debarment_types(code) ON DELETE NO ACTION ON UPDATE CASCADE;
|
||||
| );
|
||||
}
|
||||
$dbh->do( q|
|
||||
ALTER TABLE borrower_debarments
|
||||
MODIFY COLUMN type varchar(50) NOT NULL
|
||||
| );
|
||||
$dbh->do( q|
|
||||
ALTER TABLE borrower_debarments
|
||||
ADD CONSTRAINT borrower_debarments_ibfk_2 FOREIGN KEY (type) REFERENCES debarment_types(code) ON DELETE NO ACTION ON UPDATE CASCADE;
|
||||
| );
|
||||
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 23681 - Add debarment_types)\n";
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
$DBversion = 'XXX';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
$dbh->do(q{
|
||||
INSERT IGNORE INTO permissions (module_bit, code, description) VALUES
|
||||
( 3, 'manage_patron_restrictions', 'Manage patron restrictions')
|
||||
});
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 23681 - Add manage_patron_restrictions_permission)\n";
|
||||
}
|
|
@ -20,6 +20,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES
|
|||
( 3, 'manage_item_circ_alerts', 'Manage item circulation alerts'),
|
||||
( 3, 'manage_cash_registers', 'Add and remove cash registers'),
|
||||
( 3, 'manage_cities', 'Manage cities and towns'),
|
||||
( 3, 'manage_patron_restrictions', 'Manage patron restrictions'),
|
||||
( 3, 'manage_marc_frameworks', 'Manage MARC bibliographic and authority frameworks'),
|
||||
( 3, 'manage_classifications', 'Manage classification sources'),
|
||||
( 3, 'manage_matching_rules', 'Manage record matching rules'),
|
||||
|
|
|
@ -163,6 +163,11 @@
|
|||
Manage patron categories
|
||||
</span>
|
||||
<span class="permissioncode">([% name | html %])</span>
|
||||
[%- CASE 'manage_patron_restrictions' -%]
|
||||
<span class="sub_permission manage_patron_restrictions_subpermission">
|
||||
Manage patron restrictions
|
||||
</span>
|
||||
<span class="permissioncode">([% name | html %])</span>
|
||||
[%- CASE 'manage_patron_attributes' -%]
|
||||
<span class="sub_permission manage_patron_attributes_subpermission">
|
||||
Manage extended patron attributes
|
||||
|
|
|
@ -123,6 +123,10 @@
|
|||
<dt><a href="/cgi-bin/koha/admin/curbside_pickup.pl">Curbside pickup</a></dt>
|
||||
<dd>Configure curbside pickup for libraries</dd>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_parameters_manage_patron_restrictions ) %]
|
||||
<dt><a href="/cgi-bin/koha/admin/restrictions.pl">Patron restrictions</a></dt>
|
||||
<dd>Define patron restrictions.</dd>
|
||||
[% END %]
|
||||
</dl>
|
||||
[% END %]
|
||||
|
||||
|
|
Loading…
Reference in a new issue