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

(-)a/C4/SIP/Sip/MsgType.pm (+11 lines)
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
            }
952
        }
953
943
        $resp .= patron_status_string($patron);
954
        $resp .= patron_status_string($patron);
944
        $resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language;
955
        $resp .= ( defined($lang) and length($lang) == 3 ) ? $lang : $patron->language;
945
        $resp .= timestamp();
956
        $resp .= timestamp();
(-)a/etc/SIPconfig.xml (-2 / +2 lines)
Lines 51-57 Link Here
51
      <login id="lpl-sc-beacock" password="xyzzy"
51
      <login id="lpl-sc-beacock" password="xyzzy"
52
             delimiter="|" error-detect="enabled" institution="LPL"
52
             delimiter="|" error-detect="enabled" institution="LPL"
53
             send_patron_home_library_in_af="1"
53
             send_patron_home_library_in_af="1"
54
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]" >
54
             av_field_template="[% accountline.description %] [% accountline.amountoutstanding | format('%.2f') %]"
55
             validate_patron_attribute="sc-door-access" >
55
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
56
          <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" />
56
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
57
          <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" />
57
      </login>
58
      </login>
58
- 

Return to bug 16694