Skip to content

Commit

Permalink
Merge pull request #4369 from pulibrary/i4368-illiad-bug
Browse files Browse the repository at this point in the history
[#4368] Allow non-library staff with LDAP titles to request digitization
  • Loading branch information
sandbergja authored Sep 18, 2024
2 parents fcb817f + 044b640 commit 32fc734
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/requests/illiad_patron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def illiad_staff_status
if department.present? && department.include?("Library")
"GS - Library Staff"
elsif title.present?
illiad_staff_title_status
illiad_staff_title_status(ldap_title: patron.title)
else
"GS - University Staff"
end
Expand Down
7 changes: 7 additions & 0 deletions spec/models/requests/illiad_patron_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
expect(patron[:ExternalUserId]).to eq('foo')
expect(patron[:Cleared]).to eq('Yes')
end

context 'when the patron has a title' do
let(:ldap_data) { { title: 'Senior Research Scholar', uid: 'foo', department: 'Information Technology', address: 'Firestone Library$Library Information Technology', telephone: '123-456-7890', surname: 'Doe', givenname: 'Joe', email: 'joe@abc.com', pustatus: 'stf', status: 'staff' }.with_indifferent_access }
it 'can initialize' do
expect { described_class.new(user_info) }.not_to raise_error
end
end
end

it "responds with a blank patron if there is an error creating it" do
Expand Down

0 comments on commit 32fc734

Please sign in to comment.