Merge branch '2640-folder-api' into 1970-folder-view
[arvados.git] / apps / workbench / app / controllers / groups_controller.rb
1 class GroupsController < ApplicationController
2   def index
3     @groups = Group.filter [['group_class', 'not in', ['folder']]]
4     @group_uuids = @groups.collect &:uuid
5     @links_from = Link.where link_class: 'permission', tail_uuid: @group_uuids
6     @links_to = Link.where link_class: 'permission', head_uuid: @group_uuids
7   end
8
9   def show
10     return redirect_to(folder_path(@object)) if @object.group_class == 'folder'
11     super
12   end
13 end