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

Sidnei da Silva <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
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')

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.