]> source.dussan.org Git - redmine.git/commitdiff
Prevent admin users from locking their own account (#1276).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 May 2008 18:42:53 +0000 (18:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 May 2008 18:42:53 +0000 (18:42 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1448 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/users_helper.rb

index 6976d021bae267ae731689b3b5c93909ad525256..32b29526a3ac00c243ba118d0c26ebd8967be9df 100644 (file)
@@ -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