]> source.dussan.org Git - redmine.git/commitdiff
Prevent admin users from making themselves non-administrator (#1276).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 May 2008 11:22:53 +0000 (11:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 May 2008 11:22:53 +0000 (11:22 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1449 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/users/_form.rhtml

index 6ca167a59c3864c8ed4fff1b8a6179535b5d0bb4..09a798468e84c537d3215f6fecf87f212ec1b5bb 100644 (file)
@@ -12,7 +12,7 @@
        <p><%= custom_field_tag_with_label @custom_value %></p>
 <% end if @custom_values%>
 
-<p><%= f.check_box :admin %></p>
+<p><%= f.check_box :admin, :disabled => (@user == User.current) %></p>
 </div>
 
 <div class="box">