server/session.py
changeset 9979 9ccdb3751fbe
parent 9934 e32964e28a45
child 10005 7769d0f61810
child 10059 dab538127d72
--- a/server/session.py	Mon Jul 28 16:05:19 2014 +0200
+++ b/server/session.py	Fri Sep 12 09:49:01 2014 +0200
@@ -1711,10 +1711,13 @@
 
     @property
     def anonymous_session(self):
-        # XXX for now, anonymous-user is a web side option.
+        # XXX for now, anonymous_user only exists in webconfig (and testconfig).
         # It will only be present inside all-in-one instance.
         # there is plan to move it down to global config.
-        return self.user.login == self.repo.config.get('anonymous-user')
+        if not hasattr(self.repo.config, 'anonymous_user'):
+            # not a web or test config, no anonymous user
+            return False
+        return self.user.login == self.repo.config.anonymous_user()[0]
 
     @deprecated('[3.13] use getattr(session.rtype_eids_rdef(rtype, eidfrom, eidto), prop)')
     def schema_rproperty(self, rtype, eidfrom, eidto, rprop):