[Zope3-checkins] 
	SVN: Zope3/trunk/src/zope/app/authentication/authentication.py
	If an authplugin provides ILocation its __parent__ and
	__name__ will be used
    Dmitry Vasiliev 
    dima at hlabs.spb.ru
       
    Wed Aug 17 07:54:57 EDT 2005
    
    
  
Log message for revision 37979:
  If an authplugin provides ILocation its __parent__ and __name__ will be used
  for QuerySchemaSearchAdapter.
  
Changed:
  U   Zope3/trunk/src/zope/app/authentication/authentication.py
-=-
Modified: Zope3/trunk/src/zope/app/authentication/authentication.py
===================================================================
--- Zope3/trunk/src/zope/app/authentication/authentication.py	2005-08-17 06:17:06 UTC (rev 37978)
+++ Zope3/trunk/src/zope/app/authentication/authentication.py	2005-08-17 11:54:56 UTC (rev 37979)
@@ -161,8 +161,12 @@
         ILocation)
 
     def __init__(self, authplugin, pau):
-        self.__parent__ = authplugin
-        self.__name__ = ''
+        if ILocation.providedBy(authplugin):
+            self.__parent__ = authplugin.__parent__
+            self.__name__ = authplugin.__name__
+        else:
+            self.__parent__ = pau
+            self.__name__ = ""
         self.authplugin = authplugin
         self.pau = pau
         self.schema = authplugin.schema
    
    
More information about the Zope3-Checkins
mailing list