entities/authobjs.py
changeset 590 bbf6d47a2e9b
parent 0 b97547f5f1fa
child 596 5ecf67090c2f
--- a/entities/authobjs.py	Tue Feb 10 17:26:42 2009 +0100
+++ b/entities/authobjs.py	Tue Feb 10 17:27:05 2009 +0100
@@ -85,6 +85,13 @@
         """
         return self.matching_groups(group) == 1
 
+    def is_anonymous(self):
+        """ checks if user is an anonymous user"""
+        #FIXME on the web-side anonymous user is detected according
+        # to config['anonymous-user'], we don't have this info on
+        # the server side. 
+        return self.groups == frozenset(('guests', ))
+
     def owns(self, eid):
         if hasattr(self.req, 'unsafe_execute'):
             # use unsafe_execute on the repository side, in case