Skip to content

Commit

Permalink
Add authorization to generic user list API
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Apr 28, 2023
1 parent e4c2498 commit f7f79b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def list
end

def list_generic_users
authorize! :list_generic_user, @user
result = User.where.not(id: @elevated_users.pluck(:id))
.values_for_select
render json: result
Expand Down

0 comments on commit f7f79b1

Please sign in to comment.