From 39fc8f38b8695820101149228f03de9638e19228 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 25 May 2008 11:22:53 +0000 Subject: [PATCH] Prevent admin users from making themselves non-administrator (#1276). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1449 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/users/_form.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/_form.rhtml b/app/views/users/_form.rhtml index 6ca167a59..09a798468 100644 --- a/app/views/users/_form.rhtml +++ b/app/views/users/_form.rhtml @@ -12,7 +12,7 @@

<%= custom_field_tag_with_label @custom_value %>

<% end if @custom_values%> -

<%= f.check_box :admin %>

+

<%= f.check_box :admin, :disabled => (@user == User.current) %>