FIX: limit the number of group members returned for automatic groups

This commit is contained in:
Régis Hanol 2014-11-18 12:13:45 +01:00
parent f18d30f1d7
commit 9c1341b554

View file

@ -18,7 +18,9 @@ class GroupsController < ApplicationController
def members def members
group = find_group(:group_id) group = find_group(:group_id)
render_serialized(group.users.order('username_lower asc').to_a, GroupUserSerializer) members = group.users.order('username_lower asc')
members = members.limit(200) if group.automatic
render_serialized(members.to_a, GroupUserSerializer)
end end
private private