Merge branch '15361-acr-create-workflow' refs #15361
[arvados.git] / apps / workbench / app / controllers / groups_controller.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class GroupsController < ApplicationController
6   def index
7     @groups = Group.filter [['group_class', '!=', 'project']]
8     @group_uuids = @groups.collect &:uuid
9     @links_from = Link.where(link_class: 'permission', tail_uuid: @group_uuids).with_count("none")
10     @links_to = Link.where(link_class: 'permission', head_uuid: @group_uuids).with_count("none")
11     render_index
12   end
13
14   def show
15     if @object.group_class == 'project'
16       redirect_to(project_path(@object))
17     else
18       super
19     end
20   end
21 end