summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2017-12-14 15:46:09 +0100
committerFrancisco Javier López <fjlopez@gitlab.com>2017-12-14 15:46:09 +0100
commit1f804797fa43d3adfba1ce2a6492afd93240fe59 (patch)
tree94e80f3c1227f692f1e8b84a29f5fab86d7e0171
parent9119c36348068c3f1be112a0f59ca9f1215b320c (diff)
downloadgitlab-ce-1f804797fa43d3adfba1ce2a6492afd93240fe59.tar.gz
Solved copy/paste error!
-rw-r--r--lib/api/groups.rb9
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