diff options
author | Francis Irving <francis@mysociety.org> | 2010-07-20 21:57:41 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-07-20 21:57:41 +0100 |
commit | 5ea11df9d6a9f27b58b51c52e9971886ff674b19 (patch) | |
tree | 8b6ce836a2b964759143a0617bf87a4b7e8447cb /app/models/user.rb | |
parent | fe4ff2a58ee7d0f194c14523707541386c77b51e (diff) |
Show banned in public.
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index f9f1a99cf..d648fef3f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -116,6 +116,9 @@ class User < ActiveRecord::Base if not name.nil? name.strip! end + if self.public_banned? + name = name + " (Banned)" + end name end @@ -251,6 +254,10 @@ class User < ActiveRecord::Base def admin_page_links? self.admin_level == 'super' end + # Is it public that they are banned? + def public_banned? + !self.ban_text.empty? + end # Various ways the user can be banned, and text to describe it if failed def can_file_requests? self.ban_text.empty? |