[Zope-CMF] ZMI inconsistencies for CMFDefault Objects
J. Cameron Cooper
jccooper@rice.edu
Thu, 05 Jul 2001 17:06:42 -0500
This is a multi-part message in MIME format.
--------------010304020802020804020006
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
>
>
><pre>
>Type Metadata Edit Properties
>--------------------------------------------
>Document y y .
>Image . y y
>File . y y
>Link y . .
>Favorite y . .
>News Item y y .
>SkinFolder (.) (y) y
></pre>
>
After a bit of hacking I got it down to:
<pre>
Type Metadata Edit Properties
--------------------------------------------
Document y y y
Image y y y
File y y y
Link y . y
Favorite y . y
News Item y y y
SkinFolder (.) (y) y
</pre>
..which is pretty good, but I can't figure out how Link/Favorite doesn't get an Edit tab. For all I can tell, it should. Perhaps someone with a better fundamental knowledge of the codebase can tell me.
Anyway, patch is attached (and it's really simple.)
--jcc
--------------010304020802020804020006
Content-Type: text/plain;
name="cmf.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="cmf.patch"
--- CMFCore/PortalContent.py Mon Jun 11 10:10:40 2001
+++ /usr/local/zope/zope/lib/python/Products/CMFCore/PortalContent.py Tue Jul 3 13:57:42 2001
@@ -92,12 +92,12 @@
ReviewPortalContent, ModifyPortalContent
import CMFCorePermissions
from DynamicType import DynamicType
-from utils import getToolByName, _checkPermission
+from utils import getToolByName, _checkPermission, SimpleItemWithProperties
from Acquisition import aq_base
-class PortalContent(DynamicType, SimpleItem):
+class PortalContent(DynamicType, SimpleItemWithProperties):
"""
Base class for portal objects.
@@ -120,7 +120,7 @@
, 'action' : 'view'
}
)
- + SimpleItem.manage_options
+ + SimpleItemWithProperties.manage_options
)
security = ClassSecurityInfo()
--- CMFDefault/File.py Sun Jun 17 14:21:05 2001
+++ /usr/local/zope/zope/lib/python/Products/CMFDefault/File.py Thu Jul 5 10:18:31 2001
@@ -209,6 +209,9 @@
(CMFCorePermissions.ModifyPortalContent, ('edit',)),
)
+ # Inheritance from OFS screwing with ZMI tags... must set here
+ manage_options = PortalContent.manage_options
+
def __init__( self
, id
, title=''
Only in /usr/local/zope/zope/lib/python/Products/CMFDefault/: File.pyc
diff -u CMFDefault/Image.py /usr/local/zope/zope/lib/python/Products/CMFDefault/Image.py
--- CMFDefault/Image.py Sun Jun 17 14:21:05 2001
+++ /usr/local/zope/zope/lib/python/Products/CMFDefault/Image.py Thu Jul 5 10:09:51 2001
@@ -199,6 +199,9 @@
__ac_permissions__ = (
(CMFCorePermissions.ModifyPortalContent, ('edit',)),
)
+
+ # Inheritance from OFS screwing with ZMI tags... must set here
+ manage_options = PortalContent.manage_options
def __init__( self
, id
--------------010304020802020804020006--