Lines 940-945
sub handle_patron_info {
Link Here
|
940 |
|
940 |
|
941 |
$resp = (PATRON_INFO_RESP); |
941 |
$resp = (PATRON_INFO_RESP); |
942 |
if ($patron) { |
942 |
if ($patron) { |
|
|
943 |
# Bug 16694 - Limit SIP2 auth by patron attribute |
944 |
# If login account has validate_patron_attribute set, it will check if patron has this attribute set |
945 |
# If set to 1 or authorized value mapped to 1, allow access (charge and renewal privileges ok) |
946 |
if ($server->{account}->{validate_patron_attribute}) { |
947 |
my $attr = C4::Members::Attributes::GetBorrowerAttributeValue($patron->{borrowernumber}, $server->{account}->{validate_patron_attribute}); |
948 |
if ($attr && $attr == "1") { |
949 |
$patron->{charge_ok} = "1"; |
950 |
$patron->{renew_ok} = "1"; |
951 |
} else { |
952 |
$patron->{charge_ok} = 0; |
953 |
$patron->{renew_ok} = 0; |
954 |
} |
955 |
} |
956 |
|
943 |
$resp .= patron_status_string($patron); |
957 |
$resp .= patron_status_string($patron); |
944 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
958 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
945 |
$resp .= timestamp(); |
959 |
$resp .= timestamp(); |
Lines 1608-1611
sub api_auth {
Link Here
|
1608 |
|
1622 |
|
1609 |
1; |
1623 |
1; |
1610 |
__END__ |
1624 |
__END__ |
1611 |
|
|
|