[Zope3-dev] Re: deprecation of zope.app.introspector
Florent Xicluna
laxyf at yahoo.fr
Thu Sep 14 06:32:22 EDT 2006
Philipp von Weitershausen <philipp <at> weitershausen.de> writes:
> We should remove it from the trunk.
OK
> For backward compatibility, I suggest we redefine
> zope.app.introspector.Introspect to zope.app.apidoc.UseAPIDoc via
> meta:redefinePermission.
Good point. I did not know this directive.
Here is the new patch, tested.
-- Florent
Index: zope/app/apidoc/codemodule/browser/introspector.zcml
===================================================================
--- zope/app/apidoc/codemodule/browser/introspector.zcml (revision 70167)
+++ zope/app/apidoc/codemodule/browser/introspector.zcml (working copy)
@@ -47,7 +47,7 @@
name="introspector.html"
for="*"
class=".introspector.Introspector"
- permission="zope.app.introspector.Introspect"
+ permission="zope.app.apidoc.UseAPIDoc"
menu="zmi_views" title="Introspector"
template="introspector.pt"
/>
Index: zope/app/apidoc/enabled.zcml
===================================================================
--- zope/app/apidoc/enabled.zcml (revision 70167)
+++ zope/app/apidoc/enabled.zcml (working copy)
@@ -1,14 +1,30 @@
<configure
- xmlns="http://namespaces.zope.org/zope"
- xmlns:apidoc="http://namespaces.zope.org/apidoc"
- xmlns:zcml="http://namespaces.zope.org/zcml"
- i18n_domain="zope">
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:apidoc="http://namespaces.zope.org/apidoc"
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:zcml="http://namespaces.zope.org/zcml"
+ i18n_domain="zope">
<permission
id="zope.app.apidoc.UseAPIDoc"
title="[zope.app.apidoc.UseAPIDoc] Access Online API documentation"
/>
+ <permission
+ id="zope.app.introspector.Introspect"
+ title=
+ "[zope.app.introspector.Introspect] Introspect Object Classes and Interfaces"
+ description="
+ Use the object-introspection facility to discover
+ and browse interfaces and classes.
+ "
+ />
+
+ <meta:redefinePermission
+ from="zope.app.introspector.Introspect"
+ to="zope.app.apidoc.UseAPIDoc"
+ />
+
<class class=".apidoc.APIDocumentation">
<require
interface="zope.app.container.interfaces.IReadContainer"
Index: zope/app/configure.zcml
===================================================================
--- zope/app/configure.zcml (revision 70167)
+++ zope/app/configure.zcml (working copy)
@@ -71,7 +71,6 @@
<include package="zope.app.applicationcontrol" />
<include package="zope.dublincore" />
- <include package="zope.app.introspector" />
<include package="zope.app.wsgi" />
More information about the Zope3-dev
mailing list