# HG changeset patch # User Arthur Lutz # Date 1234283225 -3600 # Node ID bbf6d47a2e9be45a1f7c5691210d111293a002b4 # Parent e1e100276f596a4ae50754d34c71eb02bf993f34 test if anonymous diff -r e1e100276f59 -r bbf6d47a2e9b entities/authobjs.py --- 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