Lines 1284-1291
subtest 'search_patrons_to_anonymise' => sub {
Link Here
|
1284 |
t::lib::Mocks::mock_preference('IndependentBranches', 0); |
1284 |
t::lib::Mocks::mock_preference('IndependentBranches', 0); |
1285 |
}; |
1285 |
}; |
1286 |
|
1286 |
|
1287 |
subtest 'libraries_where_can_see_patrons + can_see_patron_infos + search_limited' => sub { |
1287 |
subtest 'libraries_where_can_see_patrons + libraries_where_can_see_things + can_see_patron_infos + search_limited' => sub { |
1288 |
plan tests => 3; |
1288 |
plan tests => 4; |
1289 |
|
1289 |
|
1290 |
# group1 |
1290 |
# group1 |
1291 |
# + library_11 |
1291 |
# + library_11 |
Lines 1329-1334
subtest 'libraries_where_can_see_patrons + can_see_patron_infos + search_limited
Link Here
|
1329 |
$sth->execute( $patron_21->borrowernumber, 'edit_borrowers' ); |
1329 |
$sth->execute( $patron_21->borrowernumber, 'edit_borrowers' ); |
1330 |
|
1330 |
|
1331 |
# Pfiou, we can start now! |
1331 |
# Pfiou, we can start now! |
|
|
1332 |
subtest 'libraries_where_can_see_things' => sub { |
1333 |
plan tests => 2; |
1334 |
t::lib::Mocks::mock_userenv( { patron => $patron_11_2 } ); |
1335 |
my $params = { |
1336 |
permission => 'editcatalogue', |
1337 |
subpermission => 'edit_any_item', |
1338 |
group_feature => 'ft_limit_item_editing', |
1339 |
}; |
1340 |
my @branchcodes = $patron_11_2->libraries_where_can_see_things($params); |
1341 |
is_deeply( |
1342 |
\@branchcodes, [ sort ( $library_11->branchcode, $library_12->branchcode ) ], |
1343 |
q|patron_11_1 has view_borrower_infos_from_any_libraries => No restriction| |
1344 |
); |
1345 |
@branchcodes = $patron_11_2->libraries_where_can_see_things($params); |
1346 |
is_deeply( |
1347 |
\@branchcodes, [ sort ( $library_11->branchcode, $library_12->branchcode ) ], |
1348 |
q|patron_11_1 has view_borrower_infos_from_any_libraries => No restriction| |
1349 |
); |
1350 |
}; |
1351 |
|
1332 |
subtest 'libraries_where_can_see_patrons' => sub { |
1352 |
subtest 'libraries_where_can_see_patrons' => sub { |
1333 |
plan tests => 3; |
1353 |
plan tests => 3; |
1334 |
|
1354 |
|
1335 |
- |
|
|