From ac56d1d5e54334624cfdf584b1b854c26d2dc00e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 29 Oct 2009 18:09:40 +0000 Subject: Do not show user profile if no visible project or activity (#4129, #3720). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2986 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/account_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 1b3bf63eb..f2d6a8d6e 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -35,6 +35,10 @@ class AccountController < ApplicationController events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10) @events_by_day = events.group_by(&:event_date) + if @user != User.current && !User.current.admin? && @memberships.empty? && events.empty? + render_404 and return + end + rescue ActiveRecord::RecordNotFound render_404 end -- cgit v1.2.3