Skip to content

Commit

Permalink
Merge pull request #979 from sul-dlss/proxy-status
Browse files Browse the repository at this point in the history
Patrons should not inherit status from their sponsors in FOLIO
  • Loading branch information
thatbudakguy authored Oct 13, 2023
2 parents 2acf471 + 788db86 commit 7b6bb55
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions app/models/folio/patron.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ def university_id
end

def status
if proxy_borrower?
# proxy borrowers inherit from the group
group&.status
else
standing
end
standing
end

def standing
Expand All @@ -57,21 +52,11 @@ def standing
end

def barred?
# proxy borrowers inherit from the group
if proxy_borrower?
group.barred?
else
user_info['manualBlocks'].any?
end
user_info['manualBlocks'].any?
end

def blocked?
# proxy borrowers inherit from the group
if proxy_borrower?
group.blocked?
else
user_info['blocks'].any?
end
user_info['blocks'].any?
end

# From https://docs.folio.org/docs/users/: Inactive status indicates that the expiration date
Expand Down

0 comments on commit 7b6bb55

Please sign in to comment.