[CMF-checkins] CVS: CMF/CMFCore/interfaces - portal_discussion.py:1.4
Tres Seaver
tseaver@zope.com
Wed, 5 Dec 2001 23:01:40 -0500
Update of /cvs-repository/CMF/CMFCore/interfaces
In directory cvs.zope.org:/tmp/cvs-serv3235/CMFCore/interfaces
Modified Files:
portal_discussion.py
Log Message:
- Update interface to document new 'overrideDiscussion' API.
- Make the API public, with a permission check, so that non-managers
can call it.
=== CMF/CMFCore/interfaces/portal_discussion.py 1.3 => 1.4 ===
class portal_discussion(Base):
- '''Links content to discussions.
- '''
+ """
+ Links content to discussions.
+ """
id = Attribute('id', 'Must be set to "portal_discussion"')
#getDiscussionFor__roles__ = None
def getDiscussionFor(content):
- '''Gets the PortalDiscussion object that applies to content.
- '''
+ """
+ Find / create the DiscussionItemContainer for 'content'.
+ """
#isDiscussionAllowedFor__roles__ = None
def isDiscussionAllowedFor(content):
- '''Returns a boolean indicating whether a discussion is
- allowed for the specified content.
- '''
+ """
+ Return a boolean indicating whether discussion is
+ allowed for the specified content; this may be looked
+ up via an object-specific value, or by place, or from
+ a site-wide policy.
+ """
+
+ #getDiscussionFor__roles__ = None
+ def overrideDiscussionFor(content, allowDiscussion):
+ """
+ if 'allowDiscussion' is None, then clear any overridden
+ setting for discussability, letting the site's default
+ policy apply. Otherwise, set the override to match
+ the boolean equivalent of 'allowDiscussion'.
+ """