Skip to content

Commit

Permalink
Merge branch '2023072110-fix-admin-not-seeing-overdue-casenotes' into…
Browse files Browse the repository at this point in the history
… staging
  • Loading branch information
kirykr committed Aug 1, 2023
2 parents fc7d054 + 9e6c4fe commit 3fbf027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ def user_clients
@user_clients ||= if admin?
Client.select(:id, :slug, :given_name, :family_name, :local_given_name, :local_family_name)
elsif manager?
client_ids = Client.where(user_id: User.self_and_subordinates(self).ids).pluck(:id)
clients.where(id: client_ids).select(:id, :slug, :given_name, :family_name, :local_given_name, :local_family_name).merge(Client.select(:id, :slug, :given_name, :family_name, :local_given_name, :local_family_name))
user_ability = Ability.new(self)
Client.accessible_by(user_ability)
elsif case_worker?
clients.select(:id, :slug, :given_name, :family_name, :local_given_name, :local_family_name)
end
Expand Down

0 comments on commit 3fbf027

Please sign in to comment.