[Zope-CVS] SVN: PluggableAuthService/trunk/plugins/CookieAuthHelper.py - So one can rename a cookie auth helper

Sidnei da Silva sidnei at enfoldsystems.com
Tue Oct 18 18:13:11 EDT 2005


Log message for revision 39506:
  
  - So one can rename a cookie auth helper
  

Changed:
  U   PluggableAuthService/trunk/plugins/CookieAuthHelper.py

-=-
Modified: PluggableAuthService/trunk/plugins/CookieAuthHelper.py
===================================================================
--- PluggableAuthService/trunk/plugins/CookieAuthHelper.py	2005-10-18 17:17:55 UTC (rev 39505)
+++ PluggableAuthService/trunk/plugins/CookieAuthHelper.py	2005-10-18 22:13:10 UTC (rev 39506)
@@ -148,12 +148,13 @@
     security.declarePrivate('manage_afterAdd')
     def manage_afterAdd(self, item, container):
         """ Setup tasks upon instantiation """
-        login_form = ZopePageTemplate( id='login_form'
-                                     , text=BASIC_LOGIN_FORM
-                                     )
-        login_form.title = 'Login Form'
-        login_form.manage_permission(view, roles=['Anonymous'], acquire=1)
-        self._setObject( 'login_form', login_form, set_owner=0 )
+        if not 'login_form' in self.objectIds():
+            login_form = ZopePageTemplate( id='login_form'
+                                           , text=BASIC_LOGIN_FORM
+                                           )
+            login_form.title = 'Login Form'
+            login_form.manage_permission(view, roles=['Anonymous'], acquire=1)
+            self._setObject( 'login_form', login_form, set_owner=0 )
 
 
     security.declarePrivate('unauthorized')



More information about the Zope-CVS mailing list