Skip to content

Commit

Permalink
In the query method of the base controller for the beta api, add Trai…
Browse files Browse the repository at this point in the history
…tsAndYieldsView to the list of models for which the all_limited method is used in deciding what to return to the user.
  • Loading branch information
gsrohde committed Mar 29, 2017
1 parent 5531726 commit a251d3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def query(model, params)
end

# restrict traits and yields by access level
if model == Trait || model == Yield
if model == Trait || model == Yield || model == TraitsAndYieldsView
model = model.all_limited(current_user)
end

Expand Down

0 comments on commit a251d3d

Please sign in to comment.