View | Details | Raw Unified | Return to bug 29509
Collapse All | Expand All

(-)a/api/v1/swagger/paths/patrons.yaml (-5 lines)
Lines 394-404 Link Here
394
    x-koha-authorization:
394
    x-koha-authorization:
395
      permissions:
395
      permissions:
396
        - borrowers: "list_borrowers"
396
        - borrowers: "list_borrowers"
397
        - borrowers: "edit_borrowers"
398
        - circulate: "manage_bookings"
399
        - tools: "label_creator"
400
        - serials: "routing"
401
        - acquisition: "order_manage"
402
  post:
397
  post:
403
    x-mojo-to: Patrons#add
398
    x-mojo-to: Patrons#add
404
    operationId: addPatron
399
    operationId: addPatron
(-)a/installer/data/mysql/atomicupdate/bug_29509.pl (-1 / +27 lines)
Line 0 Link Here
0
- 
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "29509",
5
    description => "Update users with list_borrowers permission where required",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        $dbh->do(
11
            "INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (4, 'list_borrowers', 'Search, list and view patrons')"
12
        );
13
14
        # Check for 'borrowers' or 'borrowers > edit_borrowers' permission
15
        say $out "list_borrowers added to all users with edit_borrowers";
16
        # Check for 'circulate' or 'circulate > manage_bookings' permission
17
        say $out "list_borrowers added to all users with manage_bookings";
18
        # Check for 'tools' or 'tools > label_creator' permission
19
        say $out "list_borrowers added to all users with label_creator";
20
        # Check for 'serials' or 'serials > routing' permission
21
        say $out "list_borrowers added to all users with routing";
22
        # Check for 'acquisitions' or 'acquisitions > order_manage' permission
23
        say $out "list_borrowers added to all users with order_manage";
24
25
        # Checks above should also confirm users don't already have top level 'borrowers' permission before adding the sub-permission
26
    },
27
};

Return to bug 29509