From a251d3d14636db65baf3bfff4b861e6b86349121 Mon Sep 17 00:00:00 2001 From: Scott Rohde Date: Wed, 29 Mar 2017 17:17:29 -0500 Subject: [PATCH] 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. --- app/controllers/api/base_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 69457cee0..7354ad064 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -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