diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2017-12-14 15:46:09 +0100 |
---|---|---|
committer | Francisco Javier López <fjlopez@gitlab.com> | 2017-12-14 15:46:09 +0100 |
commit | 1f804797fa43d3adfba1ce2a6492afd93240fe59 (patch) | |
tree | 94e80f3c1227f692f1e8b84a29f5fab86d7e0171 | |
parent | 9119c36348068c3f1be112a0f59ca9f1215b320c (diff) | |
download | gitlab-ce-1f804797fa43d3adfba1ce2a6492afd93240fe59.tar.gz |
Solved copy/paste error!
-rw-r--r-- | lib/api/groups.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/api/groups.rb b/lib/api/groups.rb index 573382738ce..59209002664 100644 --- a/lib/api/groups.rb +++ b/lib/api/groups.rb @@ -59,11 +59,12 @@ module API paginate(projects) end - def present_groups(groups, options = {}) - options = options.reverse_merge( + def present_groups(params, groups) + options = { with: Entities::Group, - current_user: current_user - ) + current_user: current_user, + statistics: params[:statistics] && current_user.admin? + } groups = groups.with_statistics if options[:statistics] present paginate(groups), options |