12032: Rename permission_view and remove Rails permission cache.
[arvados.git] / services / api / app / controllers / application_controller.rb
index 3a66f5328d969d5f56cc02865b6440fbf08cdff8..d09283d928617b15f6ea2b820a6d4eb3b06e734a 100644 (file)
@@ -87,9 +87,6 @@ class ApplicationController < ActionController::Base
   end
 
   def index
-    if @select.nil? || @select.include?("id")
-      @objects = @objects.uniq(&:id)
-    end
     if params[:eager] and params[:eager] != '0' and params[:eager] != 0 and params[:eager] != ''
       @objects.each(&:eager_load_associations)
     end
@@ -183,7 +180,7 @@ class ApplicationController < ActionController::Base
   end
 
   def find_objects_for_index
-    @objects ||= model_class.readable_by(*@read_users)
+    @objects ||= model_class.readable_by(*@read_users, {:include_trash => (params[:include_trash] || 'untrash' == action_name)})
     apply_where_limit_order_params
   end