Merge branch 'master' into 3138-wiselinks
[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', 'project']]]
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     render_index
8   end
9
10   def show
11     if @object.group_class.in?(['project','folder'])
12       redirect_to(project_path(@object))
13     else
14       super
15     end
16   end
17 end