##// END OF EJS Templates
Merged r2986 from trunk....
Jean-Philippe Lang -
r2873:d09afa64c805
parent child
Show More
@@ -35,6 +35,10 class AccountController < ApplicationController
35 events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
35 events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
36 @events_by_day = events.group_by(&:event_date)
36 @events_by_day = events.group_by(&:event_date)
37
37
38 if @user != User.current && !User.current.admin? && @memberships.empty? && events.empty?
39 render_404 and return
40 end
41
38 rescue ActiveRecord::RecordNotFound
42 rescue ActiveRecord::RecordNotFound
39 render_404
43 render_404
40 end
44 end
@@ -96,5 +96,53 users_006:
96 mail_notification: false
96 mail_notification: false
97 login: ''
97 login: ''
98 type: AnonymousUser
98 type: AnonymousUser
99 users_007:
100 id: 7
101 created_on: 2006-07-19 19:33:19 +02:00
102 status: 1
103 last_login_on:
104 language: ''
105 hashed_password: 1
106 updated_on: 2006-07-19 19:33:19 +02:00
107 admin: false
108 mail: someone@foo.bar
109 lastname: One
110 firstname: Some
111 auth_source_id:
112 mail_notification: false
113 login: someone
114 type: User
115 users_008:
116 id: 8
117 created_on: 2006-07-19 19:33:19 +02:00
118 status: 1
119 last_login_on:
120 language: 'it'
121 hashed_password: 1
122 updated_on: 2006-07-19 19:33:19 +02:00
123 admin: false
124 mail: miscuser8@foo.bar
125 lastname: Misc
126 firstname: User
127 auth_source_id:
128 mail_notification: false
129 login: miscuser8
130 type: User
131 users_009:
132 id: 9
133 created_on: 2006-07-19 19:33:19 +02:00
134 status: 1
135 last_login_on:
136 language: 'it'
137 hashed_password: 1
138 updated_on: 2006-07-19 19:33:19 +02:00
139 admin: false
140 mail: miscuser9@foo.bar
141 lastname: Misc
142 firstname: User
143 auth_source_id:
144 mail_notification: false
145 login: miscuser9
146 type: User
99
147
100 No newline at end of file
148
@@ -44,6 +44,11 class AccountControllerTest < Test::Unit::TestCase
44 assert_nil assigns(:user)
44 assert_nil assigns(:user)
45 end
45 end
46
46
47 def test_show_should_not_reveal_users_with_no_visible_activity_or_project
48 get :show, :id => 9
49 assert_response 404
50 end
51
47 def test_login_should_redirect_to_back_url_param
52 def test_login_should_redirect_to_back_url_param
48 # request.uri is "test.host" in test environment
53 # request.uri is "test.host" in test environment
49 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.host%2Fissues%2Fshow%2F1'
54 post :login, :username => 'jsmith', :password => 'jsmith', :back_url => 'http%3A%2F%2Ftest.host%2Fissues%2Fshow%2F1'
General Comments 0
You need to be logged in to leave comments. Login now