1709 |
1709 |
1710 # deprecated ############################################################### |
1710 # deprecated ############################################################### |
1711 |
1711 |
1712 @property |
1712 @property |
1713 def anonymous_session(self): |
1713 def anonymous_session(self): |
1714 # XXX for now, anonymous-user is a web side option. |
1714 # XXX for now, anonymous_user only exists in webconfig (and testconfig). |
1715 # It will only be present inside all-in-one instance. |
1715 # It will only be present inside all-in-one instance. |
1716 # there is plan to move it down to global config. |
1716 # there is plan to move it down to global config. |
1717 return self.user.login == self.repo.config.get('anonymous-user') |
1717 if not hasattr(self.repo.config, 'anonymous_user'): |
|
1718 # not a web or test config, no anonymous user |
|
1719 return False |
|
1720 return self.user.login == self.repo.config.anonymous_user()[0] |
1718 |
1721 |
1719 @deprecated('[3.13] use getattr(session.rtype_eids_rdef(rtype, eidfrom, eidto), prop)') |
1722 @deprecated('[3.13] use getattr(session.rtype_eids_rdef(rtype, eidfrom, eidto), prop)') |
1720 def schema_rproperty(self, rtype, eidfrom, eidto, rprop): |
1723 def schema_rproperty(self, rtype, eidfrom, eidto, rprop): |
1721 return getattr(self.rtype_eids_rdef(rtype, eidfrom, eidto), rprop) |
1724 return getattr(self.rtype_eids_rdef(rtype, eidfrom, eidto), rprop) |
1722 |
1725 |