[Zope3-checkins] SVN: Zope3/branches/dominik-locatableadapters/src/zope/app/component/metaconfigure.py cosmetics

Dominik Huber dominik.huber at projekt01.ch
Thu Apr 14 22:38:33 EDT 2005


Log message for revision 29993:
  cosmetics
  
  TODO:
  - refactor subscriber directive too

Changed:
  U   Zope3/branches/dominik-locatableadapters/src/zope/app/component/metaconfigure.py

-=-
Modified: Zope3/branches/dominik-locatableadapters/src/zope/app/component/metaconfigure.py
===================================================================
--- Zope3/branches/dominik-locatableadapters/src/zope/app/component/metaconfigure.py	2005-04-14 20:39:29 UTC (rev 29992)
+++ Zope3/branches/dominik-locatableadapters/src/zope/app/component/metaconfigure.py	2005-04-15 02:38:31 UTC (rev 29993)
@@ -177,13 +177,12 @@
         checker = InterfaceChecker(provides, permission)
         factory = _protectedFactory(factory, checker)
 
-        if trusted:
-            factory = TrustedAdapterFactory(factory)
-        elif permission != PublicPermission:
+        # handle untrusted adapter that requires dedicated permissions
+        if permission != PublicPermission:
             factory = UntrustedAdapterFactory(factory)
-    else:
-        if trusted:
-            factory = TrustedAdapterFactory(factory)
+            
+    if trusted:
+        factory = TrustedAdapterFactory(factory)
 
     _context.action(
         discriminator = ('adapter', for_, provides, name),



More information about the Zope3-Checkins mailing list