mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-11 03:33:07 +00:00
Merge r21209 from trunk to 4.2-stable (#35789).
git-svn-id: http://svn.redmine.org/redmine/branches/4.2-stable@21215 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
90d5056718
commit
3fd9787e43
@ -33,7 +33,7 @@ class ActivitiesController < ApplicationController
|
||||
@date_from = @date_to - @days
|
||||
@with_subprojects = params[:with_subprojects].nil? ? Setting.display_subprojects_issues? : (params[:with_subprojects] == '1')
|
||||
if params[:user_id].present?
|
||||
@author = User.active.find(params[:user_id])
|
||||
@author = User.visible.active.find(params[:user_id])
|
||||
end
|
||||
|
||||
@activity = Redmine::Activity::Fetcher.new(User.current, :project => @project,
|
||||
|
||||
@ -107,6 +107,18 @@ class ActivitiesControllerTest < Redmine::ControllerTest
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_user_index_with_non_visible_user_id_should_respond_404
|
||||
Role.anonymous.update! :users_visibility => 'members_of_visible_projects'
|
||||
user = User.generate!
|
||||
|
||||
@request.session[:user_id] = nil
|
||||
get :index, :params => {
|
||||
:user_id => user.id
|
||||
}
|
||||
|
||||
assert_response 404
|
||||
end
|
||||
|
||||
def test_index_atom_feed
|
||||
get(
|
||||
:index,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user