Commit 7984e5b1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Show events from all projects on user page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent b6f3f626
...@@ -11,7 +11,8 @@ class UsersController < ApplicationController ...@@ -11,7 +11,8 @@ class UsersController < ApplicationController
end end
@groups = @user.groups.accessible_to(current_user) @groups = @user.groups.accessible_to(current_user)
@events = @user.recent_events.where(project_id: @projects.pluck(:id)).limit(20) accessible_projects = @user.authorized_projects.accessible_to(current_user)
@events = @user.recent_events.where(project_id: accessible_projects.pluck(:id)).limit(20)
@title = @user.name @title = @user.name
end end
......
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