From 7f134a8c67955f30ef79c4f0c7f36f8049ea1145 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 24 May 2008 18:42:53 +0000 Subject: [PATCH] Prevent admin users from locking their own account (#1276). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1448 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/users_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb index 6976d021b..32b29526a 100644 --- a/app/helpers/users_helper.rb +++ b/app/helpers/users_helper.rb @@ -44,7 +44,7 @@ module UsersHelper link_to l(:button_unlock), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :post, :class => 'icon icon-unlock' elsif user.registered? link_to l(:button_activate), url.merge(:user => {:status => User::STATUS_ACTIVE}), :method => :post, :class => 'icon icon-unlock' - else + elsif user != User.current link_to l(:button_lock), url.merge(:user => {:status => User::STATUS_LOCKED}), :method => :post, :class => 'icon icon-lock' end end