[Zope3-checkins] CVS: Zope3/src/zope/app/contentdirective - contentdirective.py:1.10
Jim Fulton
jim@zope.com
Fri, 21 Mar 2003 16:04:11 -0500
Update of /cvs-repository/Zope3/src/zope/app/contentdirective
In directory cvs.zope.org:/tmp/cvs-serv19426/src/zope/app/contentdirective
Modified Files:
contentdirective.py
Log Message:
Made it possible to list multiple interfaces in a single interface or
set_schema attribute in a require or implements subdirective.
Changed to register mentioned interfaces with the global interface service.
=== Zope3/src/zope/app/contentdirective/contentdirective.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/contentdirective/contentdirective.py:1.9 Tue Mar 18 16:02:21 2003
+++ Zope3/src/zope/app/contentdirective/contentdirective.py Fri Mar 21 16:03:41 2003
@@ -140,6 +140,15 @@
interface = self.__context.resolve(interface)
for n, d in interface.namesAndDescriptions(1):
self.__protectName(n, permission_id, r)
+ r.append(
+ Action(
+ discriminator = None,
+ callable = handler,
+ args = (Interfaces, 'provideInterface',
+ interface.__module__+ '.'+ interface.__name__,
+ interface)
+ )
+ )
def __protectName(self, name, permission_id, r):
"Set a permission on a particular name."
@@ -168,6 +177,16 @@
r.append((
('protectSetAttribute', self.__class, name),
protectSetAttribute, (self.__class, name, permission_id)))
+
+ r.append(
+ Action(
+ discriminator = None,
+ callable = handler,
+ args = (Interfaces, 'provideInterface',
+ schema.__module__+ '.'+ schema.__name__,
+ schema)
+ )
+ )
def __call__(self):