summaryrefslogtreecommitdiff
path: root/app/models/anonymous_user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/anonymous_user.rb')
-rw-r--r--app/models/anonymous_user.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/models/anonymous_user.rb b/app/models/anonymous_user.rb
new file mode 100644
index 0000000..360a577
--- /dev/null
+++ b/app/models/anonymous_user.rb
@@ -0,0 +1,27 @@
+# The nil object for the user class
+class AnonymousUser < Object
+
+ def effective_service_level
+ AnonymousServiceLevel.new
+ end
+
+ def is_admin?
+ false
+ end
+
+ def id
+ nil
+ end
+
+ def email_address
+ nil
+ end
+
+ def login
+ nil
+ end
+
+ def messages
+ []
+ end
+end