summaryrefslogtreecommitdiffstats
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb12
1 files changed, 5 insertions, 7 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index d14914af4..d62bea449 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -60,19 +60,17 @@ class UsersController < ApplicationController
end
def show
+ unless @user.visible?
+ render_404
+ return
+ end
+
# show projects based on current user visibility
@memberships = @user.memberships.where(Project.visible_condition(User.current)).to_a
events = Redmine::Activity::Fetcher.new(User.current, :author => @user).events(nil, nil, :limit => 10)
@events_by_day = events.group_by(&:event_date)
- unless User.current.admin?
- if !@user.active? || (@user != User.current && @memberships.empty? && events.empty?)
- render_404
- return
- end
- end
-
respond_to do |format|
format.html { render :layout => 'base' }
format.api