aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/request_controller.rb9
-rw-r--r--app/models/user.rb5
-rw-r--r--app/views/user/banned.rhtml7
3 files changed, 16 insertions, 5 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 34e6d1aa6..af66dca26 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,7 +4,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.151 2009-03-09 01:17:04 francis Exp $
+# $Id: request_controller.rb,v 1.152 2009-03-18 01:32:14 francis Exp $
class RequestController < ApplicationController
@@ -348,6 +348,13 @@ class RequestController < ApplicationController
# Show an individual incoming message, and allow followup
def show_response
+ # Banned from making new requests?
+ if !authenticated_user.nil? && !authenticated_user.can_make_followup?
+ @details = authenticated_user.can_fail_html
+ render :template => 'user/banned'
+ return
+ end
+
if params[:incoming_message_id].nil?
@incoming_message = nil
else
diff --git a/app/models/user.rb b/app/models/user.rb
index 8ef0b7193..c33047d26 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -23,7 +23,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.83 2009-03-09 15:48:32 tony Exp $
+# $Id: user.rb,v 1.84 2009-03-18 01:32:14 francis Exp $
require 'digest/sha1'
@@ -223,6 +223,9 @@ class User < ActiveRecord::Base
def can_file_requests?
self.ban_text.empty?
end
+ def can_make_followup?
+ self.ban_text.empty?
+ end
def can_make_comments?
self.ban_text.empty?
end
diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.rhtml
index 1eea307fc..6bbdf4774 100644
--- a/app/views/user/banned.rhtml
+++ b/app/views/user/banned.rhtml
@@ -6,9 +6,10 @@
<%=@details%>
</p>
-<p>You will be unable to make new requests, add annotations or send messages to
-other users. You may finish the process of any existing requests that you have.
-You may continue to view other requests, and set up email alerts.</p>
+<p>You will be unable to make new requests, send follow ups, add annotations or
+send messages to other users. You may continue to view other requests, and set
+up
+email alerts.</p>
<p>
If you would like us to lift this ban, then you may politely