Skip to content

Commit a251d3d

Browse files
committed
In the query method of the base controller for the beta api, add TraitsAndYieldsView to the list of models for which the all_limited method is used in deciding what to return to the user.
1 parent 5531726 commit a251d3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/api/base_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def query(model, params)
6060
end
6161

6262
# restrict traits and yields by access level
63-
if model == Trait || model == Yield
63+
if model == Trait || model == Yield || model == TraitsAndYieldsView
6464
model = model.all_limited(current_user)
6565
end
6666

0 commit comments

Comments
 (0)