2872: Rename folders to projects
[arvados.git] / apps / workbench / app / controllers / groups_controller.rb
index 854496a56a27c2e73e4a2b6a68cbc8803a440bac..f97bb20f1331aa71c1b8162a0b4e52a0ecbae40a 100644 (file)
@@ -1,13 +1,16 @@
 class GroupsController < ApplicationController
   def index
-    @groups = Group.filter [['group_class', 'not in', ['folder']]]
+    @groups = Group.filter [['group_class', 'not in', ['folder', 'project']]]
     @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
   end
 
   def show
-    return redirect_to(folder_path(@object)) if @object.group_class == 'folder'
-    super
+    if @object.group_class.in?(['project','folder'])
+      redirect_to(project_path(@object))
+    else
+      super
+    end
   end
 end