diff --git a/api/v1/swagger/paths/patrons.yaml b/api/v1/swagger/paths/patrons.yaml index a2e86ec2a8..7efa3bceb7 100644 --- a/api/v1/swagger/paths/patrons.yaml +++ b/api/v1/swagger/paths/patrons.yaml @@ -397,6 +397,7 @@ - tools: "label_creator" - serials: "routing" - acquisition: "order_manage" + - borrowers: "list_borrowers" post: x-mojo-to: Patrons#add operationId: addPatron diff --git a/installer/data/mysql/atomicupdate/bug_30230_add-new-list-borrowers-permission.pl b/installer/data/mysql/atomicupdate/bug_30230_add-new-list-borrowers-permission.pl new file mode 100755 index 0000000000..88772b4886 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_30230_add-new-list-borrowers-permission.pl @@ -0,0 +1,16 @@ +use Modern::Perl; + +return { + bug_number => "BUG_30230", + description => "Add new list_borrowers permission", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + "INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (4, 'list_borrowers', 'Search and list patrons')" + ); + + say $out "Added new permission 'list_borrowers'"; + }, +}; diff --git a/installer/data/mysql/mandatory/userpermissions.sql b/installer/data/mysql/mandatory/userpermissions.sql index 7e52abd262..ad51b5736c 100644 --- a/installer/data/mysql/mandatory/userpermissions.sql +++ b/installer/data/mysql/mandatory/userpermissions.sql @@ -45,6 +45,7 @@ INSERT INTO permissions (module_bit, code, description) VALUES ( 3, 'manage_identity_providers', 'Manage identity providers'), ( 4, 'delete_borrowers', 'Delete patrons'), ( 4, 'edit_borrowers', 'Add, modify and view patron information'), + ( 4, 'list_borrowers', 'Search and list patrons'), ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'), ( 6, 'place_holds', 'Place holds for patrons'), ( 6, 'modify_holds_priority', 'Modify holds priority'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc index b3a21080be..cbb8c8bda9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -14,9 +14,11 @@ [% END %]