aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/user_controller.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-02-18 14:43:58 +0000
committerGareth Rees <gareth@mysociety.org>2015-02-24 13:23:17 +0000
commit362a7b967819ca0a58dd251ab77842ab18aa7f64 (patch)
treeb449f0fbb41372fd2f585e15cbdebd516e2b41e1 /app/controllers/user_controller.rb
parentae648fc4ff414eb33ef17744d4434a0e4a43e606 (diff)
Add specs to AboutMeValidator
Diffstat (limited to 'app/controllers/user_controller.rb')
-rw-r--r--app/controllers/user_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb
index 56f42891d..32b6978ea 100644
--- a/app/controllers/user_controller.rb
+++ b/app/controllers/user_controller.rb
@@ -569,6 +569,12 @@ class UserController < ApplicationController
return
end
+ if @user.banned?
+ flash[:error] = _('Banned users cannot edit their profile')
+ redirect_to set_profile_about_me_path
+ return
+ end
+
@about_me = AboutMeValidator.new(params[:about_me])
if !@about_me.valid?
render :action => 'set_profile_about_me'