Lines 932-937
sub handle_patron_info {
Link Here
|
932 |
|
932 |
|
933 |
$resp = (PATRON_INFO_RESP); |
933 |
$resp = (PATRON_INFO_RESP); |
934 |
if ($patron) { |
934 |
if ($patron) { |
|
|
935 |
# Bug 16694 - Limit SIP2 auth by patron attribute |
936 |
# If login account has validate_patron_attribute set, it will check if patron has this attribute set |
937 |
# If set to 1 or authorized value mapped to 1, allow access (charge and renewal privileges ok) |
938 |
if ($server->{account}->{validate_patron_attribute}) { |
939 |
my $attr = C4::Members::Attributes::GetBorrowerAttributeValue($patron->{borrowernumber}, $server->{account}->{validate_patron_attribute}); |
940 |
if ($attr && $attr == "1") { |
941 |
$patron->{charge_ok} = "1"; |
942 |
$patron->{renew_ok} = "1"; |
943 |
} else { |
944 |
$patron->{charge_ok} = 0; |
945 |
$patron->{renew_ok} = 0; |
946 |
} |
947 |
} |
948 |
|
935 |
$resp .= patron_status_string($patron); |
949 |
$resp .= patron_status_string($patron); |
936 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
950 |
$resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language; |
937 |
$resp .= timestamp(); |
951 |
$resp .= timestamp(); |
Lines 1606-1609
sub api_auth {
Link Here
|
1606 |
|
1620 |
|
1607 |
1; |
1621 |
1; |
1608 |
__END__ |
1622 |
__END__ |
1609 |
|
|
|