[Checkins] SVN: z3c.authentication/trunk/src/z3c/authentication/cookie/ Bugfix,

Roger Ineichen roger at projekt01.ch
Fri Nov 3 12:30:18 EST 2006


Log message for revision 71048:
  Bugfix, 
  Added backward compatibility for existing projects

Changed:
  U   z3c.authentication/trunk/src/z3c/authentication/cookie/interfaces.py
  U   z3c.authentication/trunk/src/z3c/authentication/cookie/plugin.py

-=-
Modified: z3c.authentication/trunk/src/z3c/authentication/cookie/interfaces.py
===================================================================
--- z3c.authentication/trunk/src/z3c/authentication/cookie/interfaces.py	2006-11-03 17:26:55 UTC (rev 71047)
+++ z3c.authentication/trunk/src/z3c/authentication/cookie/interfaces.py	2006-11-03 17:30:18 UTC (rev 71048)
@@ -39,12 +39,7 @@
             min=0,
             )
 
-    autologin = zope.schema.Bool(
-        title=u'Autologin',
-        description=u"Auto login via cookie if set to true.",
-        default=False)
 
-
 class ICookieCredentialsPlugin(interfaces.ICredentialsPlugin, 
     session.IBrowserFormChallenger):
     """A cookie credential plugin."""
@@ -65,3 +60,8 @@
 
     def getPassword():
         """Return password."""
+
+    autologin = zope.schema.Bool(
+        title=u'Autologin',
+        description=u"Auto login via cookie if set to true.",
+        default=False)

Modified: z3c.authentication/trunk/src/z3c/authentication/cookie/plugin.py
===================================================================
--- z3c.authentication/trunk/src/z3c/authentication/cookie/plugin.py	2006-11-03 17:26:55 UTC (rev 71047)
+++ z3c.authentication/trunk/src/z3c/authentication/cookie/plugin.py	2006-11-03 17:30:18 UTC (rev 71048)
@@ -21,6 +21,7 @@
 from urllib import urlencode
 
 from zope.publisher.interfaces.http import IHTTPRequest
+from zope.schema.fieldproperty import FieldProperty
 from zope.traversing.browser.absoluteurl import absoluteURL
 
 from zope.app.component import hooks
@@ -49,6 +50,8 @@
     """
     zope.interface.implements(interfaces.ICookieCredentials)
 
+    autologin = FieldProperty(interfaces.ICookieCredentials['autologin'])
+
     def __init__(self, login, password):
         self.login = login
         self.password = password



More information about the Checkins mailing list