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

(-)a/api/v1/swagger/paths/auth.yaml (-1 / +2 lines)
Lines 1131-1134 Link Here
1131
          $ref: ../swagger.yaml#/definitions/error
1131
          $ref: ../swagger.yaml#/definitions/error
1132
    x-koha-authorization:
1132
    x-koha-authorization:
1133
      permissions:
1133
      permissions:
1134
        borrowers: "1"
1134
        - borrowers: "validate_borrowers"
1135
(-)a/installer/data/mysql/mandatory/userpermissions.sql (+1 lines)
Lines 46-51 INSERT INTO permissions (module_bit, code, description) VALUES Link Here
46
   ( 4, 'delete_borrowers', 'Delete patrons'),
46
   ( 4, 'delete_borrowers', 'Delete patrons'),
47
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
47
   ( 4, 'edit_borrowers', 'Add, modify and view patron information'),
48
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
48
   ( 4, 'list_borrowers', 'Search, list and view patrons'),
49
   ( 4, 'validate_borrowers', 'Check validity of username and password'),
49
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
50
   ( 4, 'view_borrower_infos_from_any_libraries', 'View patron infos from any libraries'),
50
   ( 6, 'place_holds', 'Place holds for patrons'),
51
   ( 6, 'place_holds', 'Place holds for patrons'),
51
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
52
   ( 6, 'modify_holds_priority', 'Modify holds priority'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/permissions.inc (+5 lines)
Lines 317-322 Link Here
317
            Search, list and view patrons
317
            Search, list and view patrons
318
        </span>
318
        </span>
319
        <span class="permissioncode">([% name | html %])</span>
319
        <span class="permissioncode">([% name | html %])</span>
320
    [%- CASE 'validate_borrowers' -%]
321
        <span class="sub_permission validate_borrowers_subpermission">
322
            Check validity of username and password
323
        </span>
324
        <span class="permissioncode">([% name | html %])</span>
320
    [%- CASE 'view_borrower_infos_from_any_libraries' -%]
325
    [%- CASE 'view_borrower_infos_from_any_libraries' -%]
321
        <span class="sub_permission view_borrower_infos_from_any_libraries_subpermission">
326
        <span class="sub_permission view_borrower_infos_from_any_libraries_subpermission">
322
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
327
            View patron infos from any libraries. If not set the logged in user could only access patron infos from its own library or group of libraries.
(-)a/t/db_dependent/api/v1/password_validation.t (-2 / +14 lines)
Lines 39-47 $schema->storage->txn_begin; Link Here
39
my $librarian = $builder->build_object(
39
my $librarian = $builder->build_object(
40
    {
40
    {
41
        class => 'Koha::Patrons',
41
        class => 'Koha::Patrons',
42
        value => { flags => 2 ** 4 } # borrowers flag = 4
42
        value => { flags => 0 } #No top-level permissions
43
    }
43
    }
44
);
44
);
45
46
# Ensure our librarian can see users from all branches (once list_borrowers is added)
47
$builder->build(
48
    {
49
        source => 'UserPermission',
50
        value  => {
51
            borrowernumber => $librarian->borrowernumber,
52
            module_bit     => 4,
53
            code           => 'validate_borrowers',
54
        },
55
     }
56
);
57
45
my $password = 'thePassword123';
58
my $password = 'thePassword123';
46
$librarian->set_password( { password => $password, skip_validation => 1 } );
59
$librarian->set_password( { password => $password, skip_validation => 1 } );
47
my $userid = $librarian->userid;
60
my $userid = $librarian->userid;
48
- 

Return to bug 36561