Commit 98f4665e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Hide user membership in groups at user page

Based on projects visitor can see when browse user page
Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent dbd3680f
...@@ -11,6 +11,7 @@ class UsersController < ApplicationController ...@@ -11,6 +11,7 @@ class UsersController < ApplicationController
end end
@events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20) @events = @user.recent_events.where(project_id: @projects.map(&:id)).limit(20)
@title = @user.name @title = @user.name
@groups = @projects.map(&:group).compact.uniq
end end
def determine_layout def determine_layout
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
%small member since #{@user.created_at.stamp("Nov 12, 2031")} %small member since #{@user.created_at.stamp("Nov 12, 2031")}
.clearfix .clearfix
%h4 Groups: %h4 Groups:
= render 'groups', groups: @user.groups = render 'groups', groups: @groups
%hr %hr
%h4 User Activity: %h4 User Activity:
= render @events = render @events
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment