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.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/app/models/anonymous_user.rb b/app/models/anonymous_user.rb
new file mode 100644
index 0000000..87239eb
--- /dev/null
+++ b/app/models/anonymous_user.rb
@@ -0,0 +1,31 @@
+# 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
+ nil
+ end
+
+ def email_address
+ nil
+ end
+
+ def login
+ nil
+ end
+
+ def messages
+ []
+ end
+end