Log message for revision 105405:
  LP #411732: Silence security declaration warnings for context and request on 
views protected by an interface.
  

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  U   Zope/branches/2.12/src/App/class_init.py

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst  2009-10-31 10:56:36 UTC (rev 105404)
+++ Zope/branches/2.12/doc/CHANGES.rst  2009-10-31 11:03:24 UTC (rev 105405)
@@ -17,6 +17,9 @@
   - Acquisition = 2.12.4 (fixes problems with iteration support)
   - setuptools = 0.6c11
 
+- LP #411732: Silence security declaration warnings for context and request
+  on views protected by an interface.
+
 - Assorted documentation cleanups, including a script to rebuild HTML
   documentation on Windows.
 

Modified: Zope/branches/2.12/src/App/class_init.py
===================================================================
--- Zope/branches/2.12/src/App/class_init.py    2009-10-31 10:56:36 UTC (rev 
105404)
+++ Zope/branches/2.12/src/App/class_init.py    2009-10-31 11:03:24 UTC (rev 
105405)
@@ -77,7 +77,10 @@
                 pr = PermissionRole(pname)
             for mname in mnames:
                 setattr(self, mname+'__roles__', pr)
-                if mname and not hasattr(self, mname):
+                if (mname and mname not in ('context', 'request') and
+                    not hasattr(self, mname)):
+                    # don't complain about context or request, as they are
+                    # frequently not available as class attributes
                     logging.getLogger("Init").warning(
                         "Class %s.%s has a security declaration for "
                         "nonexistent method %r", self.__module__,

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to