1 class GroupsController < ApplicationController
2 before_filter :ensure_current_user_is_admin
5 @groups = Group.limit(10000).all
6 @group_uuids = @groups.collect &:uuid
7 @owned_users = User.where owner: @group_uuids
8 @links_from = Link.where link_class: 'permission', tail_uuid: @group_uuids
9 @links_to = Link.where link_class: 'permission', head_uuid: @group_uuids
13 @collections = Collection.where(owner: @object.uuid)
19 where(head_uuid: @collections.collect(&:uuid)).
21 if link.properties[:name]
22 @names[link.head_uuid] ||= []
23 @names[link.head_uuid] << link.properties[:name]
25 if link.link_class == 'resources' and link.name == 'wants'
26 @keep_flag[link.head_uuid] = true
28 @pgp_hu_id[link.head_uuid] ||= link.properties[:pgp_hu_id]
30 @collections_total_bytes = @collections.collect(&:total_bytes).inject(0,&:+)