[z3-checkins] r5252 - z3/Five/trunk
philikon at codespeak.net
philikon at codespeak.net
Wed Jun 23 13:18:41 MEST 2004
Author: philikon
Date: Wed Jun 23 13:18:41 2004
New Revision: 5252
Modified:
z3/Five/trunk/fiveconfigure.py
Log:
Make the browser:page directive handler compatible with Z3's pendant.
That means: permission is required now and doesn't default to 'zope.Public'
(that's a good thing) and allowed_interface/attributes are accepted as
parameters (but not used anywhere yet).
Modified: z3/Five/trunk/fiveconfigure.py
==============================================================================
--- z3/Five/trunk/fiveconfigure.py (original)
+++ z3/Five/trunk/fiveconfigure.py Wed Jun 23 13:18:41 2004
@@ -22,21 +22,18 @@
from viewable import Viewable
from api import BrowserView
from metaclass import makeClass
-from security import getSecurityInfo, CheckerPublic
+from security import getSecurityInfo
from metaconfigure import protectName, initializeClass
-#def handler(serviceName, methodName, *args, **kwargs):
-# method=getattr(getService(serviceName), methodName)
-# method(*args, **kwargs)
-
def handler(serviceName, methodName, *args, **kwargs):
- method=getattr(getGlobalService(serviceName), methodName)
+ # specifically ask for a global service
+ method = getattr(getGlobalService(serviceName), methodName)
method(*args, **kwargs)
-def page(_context, name, for_,
+def page(_context, name, permission, for_,
layer='default', template=None, class_=None,
attribute='__call__', menu=None, title=None,
- permission=CheckerPublic
+ allowed_interface=None, allowed_attributes=None,
):
try:
@@ -111,7 +108,6 @@
args = (new_class,)
)
-
def _handle_for(_context, for_):
if for_ is not None:
_context.action(
More information about the z3-checkins
mailing list