Commit 324f0e9c authored by Hanno Schlichting's avatar Hanno Schlichting

LP #411732: Silence security declaration warnings for context and request on...

LP #411732: Silence security declaration warnings for context and request on views protected by an interface.
parent e6ef611a
...@@ -17,6 +17,9 @@ Bugs Fixed ...@@ -17,6 +17,9 @@ Bugs Fixed
- Acquisition = 2.12.4 (fixes problems with iteration support) - Acquisition = 2.12.4 (fixes problems with iteration support)
- setuptools = 0.6c11 - 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 - Assorted documentation cleanups, including a script to rebuild HTML
documentation on Windows. documentation on Windows.
......
...@@ -77,7 +77,10 @@ def InitializeClass(self): ...@@ -77,7 +77,10 @@ def InitializeClass(self):
pr = PermissionRole(pname) pr = PermissionRole(pname)
for mname in mnames: for mname in mnames:
setattr(self, mname+'__roles__', pr) 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( logging.getLogger("Init").warning(
"Class %s.%s has a security declaration for " "Class %s.%s has a security declaration for "
"nonexistent method %r", self.__module__, "nonexistent method %r", self.__module__,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment