diff options
author | Gareth Rees <gareth@mysociety.org> | 2015-02-18 13:29:38 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2015-02-24 13:23:17 +0000 |
commit | 9aa1074dca82aea9b968c5aa67c70dd8a844d969 (patch) | |
tree | 90dcd0761fbe8e18255deb2f10d6e02d7ff8c7af | |
parent | 362a7b967819ca0a58dd251ab77842ab18aa7f64 (diff) |
Disable about_me text field if user is banned
Stops the user editing their about me if they have been banned.
https://www.righttoknow.org.au/ reported that spam accounts were being
created and even though the user accounts were getting banned, the spam
user/bots could still edit the about me field to propagate more spam.
-rw-r--r-- | app/views/user/set_profile_about_me.html.erb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/user/set_profile_about_me.html.erb b/app/views/user/set_profile_about_me.html.erb index fb7de7e97..42607ddf8 100644 --- a/app/views/user/set_profile_about_me.html.erb +++ b/app/views/user/set_profile_about_me.html.erb @@ -17,8 +17,12 @@ </div> <p> - <label class="form_label" for="set_profile_about_me"><%= _('About you:')%></label> - <%= f.text_area :about_me, :rows => 5, :cols => 55 %> + <label class="form_label" for="set_profile_about_me"> + <%= _('About you:')%> + </label> + <% about_me_opts = { :rows => 5, :cols => 55 } %> + <% about_me_opts.merge!({ :disabled => 'disabled' }) if @user.banned? %> + <%= f.text_area :about_me, about_me_opts %> </p> <div class="form_note"> |