Skip to content

Commit

Permalink
Merge pull request #482 from MaMpf-HD/fix/elevated-user-list
Browse files Browse the repository at this point in the history
[Security fix] Add authorization to generic user list API
  • Loading branch information
Splines authored Apr 28, 2023
2 parents e4c2498 + f7f79b1 commit 33b46ce
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 33b46ce

Please sign in to comment.