Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-26 14:56:51 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-02-26 14:56:51 +0400
commit98f4665eaf8d352988467217b6b91732e9f8cced (patch)
treedbeec19871a23a9d51f2e1794aca1ed97f5010b1
parentdbd3680f465f01b44882a0222d2614fdefcebbb8 (diff)
Hide user membership in groups at user page
Based on projects visitor can see when browse user page Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/controllers/users_controller.rb1
-rw-r--r--app/views/users/show.html.haml2
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index e86601a439e..28da6da4403 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -11,6 +11,7 @@ class UsersController < ApplicationController
end
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
@title = @user.name
+ @groups = @projects.map(&:group).compact.uniq
end
def determine_layout
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
index 98210af1e3d..fda4793270f 100644
--- a/app/views/users/show.html.haml
+++ b/app/views/users/show.html.haml
@@ -14,7 +14,7 @@
%small member since #{@user.created_at.stamp("Nov 12, 2031")}
.clearfix
%h4 Groups:
- = render 'groups', groups: @user.groups
+ = render 'groups', groups: @groups
%hr
%h4 User Activity:
= render @events