|
Lines 1496-1502
sub can_see_patrons_from {
Link Here
|
| 1496 |
|
1496 |
|
| 1497 |
=head3 libraries_where_can_see_patrons |
1497 |
=head3 libraries_where_can_see_patrons |
| 1498 |
|
1498 |
|
| 1499 |
my $libraries = $patron-libraries_where_can_see_patrons; |
1499 |
my $libraries = $patron->libraries_where_can_see_patrons; |
| 1500 |
|
1500 |
|
| 1501 |
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos. |
1501 |
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos. |
| 1502 |
The branchcodes are arbitrarily returned sorted. |
1502 |
The branchcodes are arbitrarily returned sorted. |
|
Lines 1545-1551
sub can_edit_item {
Link Here
|
| 1545 |
|
1545 |
|
| 1546 |
return 1 if C4::Context->IsSuperLibrarian(); |
1546 |
return 1 if C4::Context->IsSuperLibrarian(); |
| 1547 |
|
1547 |
|
| 1548 |
if ( C4::Context->preference('IndependentBranches') ) { |
1548 |
if ( $userenv && C4::Context->preference('IndependentBranches') ) { |
| 1549 |
return $userenv->{branch} eq $branchcode; |
1549 |
return $userenv->{branch} eq $branchcode; |
| 1550 |
} |
1550 |
} |
| 1551 |
|
1551 |
|
|
Lines 1653-1687
sub can_log_into {
Link Here
|
| 1653 |
return $can; |
1653 |
return $can; |
| 1654 |
} |
1654 |
} |
| 1655 |
|
1655 |
|
| 1656 |
=head3 libraries_where_can_see_patrons |
|
|
| 1657 |
|
| 1658 |
my $libraries = $patron-libraries_where_can_see_patrons; |
| 1659 |
|
| 1660 |
Return the list of branchcodes(!) of libraries the patron is allowed to see other patron's infos. |
| 1661 |
The branchcodes are arbitrarily returned sorted. |
| 1662 |
We are supposing here that the object is related to the logged in patron (use of C4::Context::only_my_library) |
| 1663 |
|
| 1664 |
An empty array means no restriction, the patron can see patron's infos from any libraries. |
| 1665 |
|
| 1666 |
=cut |
| 1667 |
|
| 1668 |
sub libraries_where_can_see_patrons { |
| 1669 |
my ($self) = @_; |
| 1670 |
|
| 1671 |
return $self->libraries_where_can_see_things( |
| 1672 |
{ |
| 1673 |
permission => 'borrowers', |
| 1674 |
subpermission => 'view_borrower_infos_from_any_libraries', |
| 1675 |
group_feature => 'ft_hide_patron_info', |
| 1676 |
} |
| 1677 |
); |
| 1678 |
} |
| 1679 |
|
| 1680 |
=head3 libraries_where_can_see_things |
1656 |
=head3 libraries_where_can_see_things |
| 1681 |
|
1657 |
|
| 1682 |
my $libraries = $thing-libraries_where_can_see_things; |
1658 |
my $libraries = $thing-libraries_where_can_see_things; |
| 1683 |
|
1659 |
|
| 1684 |
Returns a list of libraries where an aribitarary action is allowd to be taken by the logged in librarian |
1660 |
Returns a list of libraries where an aribitarary action is allowed to be taken by the logged in librarian |
| 1685 |
against an object based on some branchcode related to the object ( patron branchcode, item homebranch, etc ). |
1661 |
against an object based on some branchcode related to the object ( patron branchcode, item homebranch, etc ). |
| 1686 |
|
1662 |
|
| 1687 |
We are supposing here that the object is related to the logged in librarian (use of C4::Context::only_my_library) |
1663 |
We are supposing here that the object is related to the logged in librarian (use of C4::Context::only_my_library) |