bug: sendPing needs ModifyPortalContent and contents tab is displayed as action
Jens Nachtigall <nachtigall-S0/[email protected]> Thu, 6 Jul 2006 16:58:56 +0200
| Newsgroups | gmane.comp.python.zope.coreblog.english |
|---|---|
| Message-ID | <[email protected]> |
2 issues: 1st sendPing needs ModifyPortalContent ========================== therefore "member" with the rights to "add portal content" and to "add coreblog2Entry" cannot save a coreblogentry. 2nd ===== contents tab is unnecessary, if you asked me, since there is already the entry_listing by default. the attached patch fixes both. HTH, jens _______________________________________________ COREblog-en mailing list COREblog-en-/9qXvnWia/9Wk0Htik3J/[email protected] http://postaria.com/mailman/listinfo/coreblog-en Unsubscription writing to coreblog-en-leave-/9qXvnWia/9Wk0Htik3J/[email protected]
2issues.patch
(text/x-diff, 1010 B)
--- coreblog2-orig-with-contents-tab.py 2006-07-06 14:47:05.000000000 +0200
+++ coreblog2.py 2006-07-06 16:52:25.000000000 +0200
@@ -62,7 +62,7 @@
from AccessControl import ClassSecurityInfo
from Products.CMFCore.CMFCorePermissions import View,ListFolderContents,\
- ModifyPortalContent
+ ModifyPortalContent, AddPortalContent
from Products.CMFCore.utils import getToolByName
import calendar
@@ -431,6 +431,10 @@
def canSetDefaultPage(self):
return False
+ security.declarePublic("displayContentsTab")
+ def displayContentsTab(self):
+ return False
+
security.declarePrivate('setLong_description')
def setLong_description(self, value, **kwargs):
#
@@ -803,7 +807,7 @@
#
# Sending PING
#
- security.declareProtected(ModifyPortalContent, 'sendPing')
+ security.declareProtected(AddPortalContent, 'sendPing')
def sendPing(self,idx = -1):
"""
Send ping to servers on setting.