summaryrefslogtreecommitdiffstats
path: root/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 15:50:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 15:50:16 +0000
commitbfed36ac84122e1856e18a4d1e7cb3e3753b2fa8 (patch)
tree09d4afecee7087d9e29aa5d7a375cdc637e657eb /app/controllers/users_controller.rb
parentd6f9e576e88dae3aeec6a4997d1dcf00c9821878 (diff)
downloadredmine-bfed36ac84122e1856e18a4d1e7cb3e3753b2fa8.tar.gz
redmine-bfed36ac84122e1856e18a4d1e7cb3e3753b2fa8.zip
Let administrators see locked user profiles.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3493 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/users_controller.rb')
-rw-r--r--app/controllers/users_controller.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index 99b01c30f..14930e338 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -50,7 +50,7 @@ class UsersController < ApplicationController
end
def show
- @user = User.active.find(params[:id])
+ @user = User.find(params[:id])
@custom_values = @user.custom_values
# show only public projects and private projects that the logged in user is also a member of
@@ -61,9 +61,11 @@ class UsersController < 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
- return
+ unless User.current.admin?
+ if !@user.active? || (@user != User.current && @memberships.empty? && events.empty?)
+ render_404
+ return
+ end
end
render :layout => 'base'