[Checkins]
SVN: grokcore.security/trunk/src/grokcore/security/util.py
Removed useless helper. It may still be needed within Grok
itself, so that's where it
Philipp von Weitershausen
philikon at philikon.de
Fri Aug 1 08:04:00 EDT 2008
Log message for revision 89125:
Removed useless helper. It may still be needed within Grok itself, so that's where it
should survive for now. Soon it'll have to part from this world forever.
Changed:
U grokcore.security/trunk/src/grokcore/security/util.py
-=-
Modified: grokcore.security/trunk/src/grokcore/security/util.py
===================================================================
--- grokcore.security/trunk/src/grokcore/security/util.py 2008-08-01 12:02:29 UTC (rev 89124)
+++ grokcore.security/trunk/src/grokcore/security/util.py 2008-08-01 12:03:58 UTC (rev 89125)
@@ -15,7 +15,6 @@
"""
from martian.error import GrokError
from zope.component import queryUtility
-from zope.security.checker import NamesChecker, defineChecker
from zope.security.interfaces import IPermission
from zope.app.security.protectclass import protectName
from zope.app.security.protectclass import protectSetAttribute
@@ -35,22 +34,6 @@
permission = check_or_default_permission(class_, permission)
protectSetAttribute(class_, name, permission)
-def make_checker(factory, view_factory, permission, method_names=None):
- """Make a checker for a view_factory associated with factory.
-
- These could be one and the same for normal views, or different
- in case we make method-based views such as for JSON and XMLRPC.
- """
- if method_names is None:
- method_names = ['__call__']
- if permission is not None:
- check_permission(factory, permission)
- if permission is None or permission == 'zope.Public':
- checker = NamesChecker(method_names)
- else:
- checker = NamesChecker(method_names, permission)
- defineChecker(view_factory, checker)
-
def check_or_default_permission(class_, permission):
"""Return default permission (public) if permission is None,
otherwise make sure permission has been defined.
More information about the Checkins
mailing list