2961: Changed index methods on some controllers to use render_index instead of
[arvados.git] / apps / workbench / app / controllers / groups_controller.rb
index 672fe90174f58b5fe418def2ca7c8b0007b017b0..71327d132e7bd6238accf48236bc45194f90d5ab 100644 (file)
@@ -1,13 +1,14 @@
 class GroupsController < ApplicationController
   def index
-    @groups = Group.all
+    @groups = Group.filter [['group_class', 'not in', ['folder']]]
     @group_uuids = @groups.collect &:uuid
     @links_from = Link.where link_class: 'permission', tail_uuid: @group_uuids
     @links_to = Link.where link_class: 'permission', head_uuid: @group_uuids
+    render_index
   end
 
   def show
-    @objects = @object.owned_items include_linked: true
+    return redirect_to(folder_path(@object)) if @object.group_class == 'folder'
     super
   end
 end