[Zope-Checkins] CVS: Zope/lib/python/Products/Sessions - BrowserIdManager.py:1.5 SessionInterfaces.py:1.6
Chris McDonough
chrism@zope.com
Tue, 20 Nov 2001 11:08:40 -0500
Update of /cvs-repository/Zope/lib/python/Products/Sessions
In directory cvs.zope.org:/tmp/cvs-serv11439
Modified Files:
BrowserIdManager.py SessionInterfaces.py
Log Message:
Added 'setBrowserIdCookieByForce' method (thanks to Richard Jones).
=== Zope/lib/python/Products/Sessions/BrowserIdManager.py 1.4 => 1.5 ===
self._setCookie('deleted', self.REQUEST, remove=1)
+ security.declareProtected(ACCESS_CONTENTS_PERM,'setBrowserIdCookieByForce')
+ def setBrowserIdCookieByForce(self, bid):
+ """ """
+ if 'cookies' not in self.browserid_namespaces:
+ raise BrowserIdManagerErr,('Cookies are not now being used as a '
+ 'browser id namespace, thus the '
+ 'browserid cookie cannot be forced.')
+ self._setCookie(bid, self.REQUEST)
+
security.declareProtected(ACCESS_CONTENTS_PERM, 'isBrowserIdFromCookie')
def isBrowserIdFromCookie(self):
""" returns true if browser id is from REQUEST.cookies """
=== Zope/lib/python/Products/Sessions/SessionInterfaces.py 1.5 => 1.6 ===
"""
+ def setBrowserIdCookieByForce(self, bid):
+ """
+ Sets the browser id cookie to browser id 'bid' by force.
+ Useful when you need to 'chain' browser id cookies across domains
+ for the same user (perhaps temporarily using query strings).
+
+ Permission required: Access contents information
+
+ Raises: BrowserIdManagerErr. If the 'cookies' namespace isn't
+ a browser id namespace at the time of the call.
+ """
+
class SessionDataManagerInterface(
Interface.Base
):