plone.app.discussion/plone/app/discussion/configure.zcml
Carsten Senger e946ef7979 Add an accessor method for title. As title is part of the interface
IComment for which we <require> zope2.View a permission check will raise
Unauthorized cause we can not assure that the user's userfolder is in 
the acqusition chain of the object (the attribute is a bare unicode object).
It works for methods. im_self is used to get the acquisition wrapped
object.

svn path=/plone.app.discussion/trunk/; revision=29199
2009-08-20 02:06:15 +00:00

96 lines
3.5 KiB
XML

<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="plone.app.discussion">
<include package="plone.indexer" />
<include file="permissions.zcml" />
<include package=".browser" />
<!-- Register the installation GenericSetup extension profile -->
<genericsetup:registerProfile
name="default"
title="Plone Discussions"
description="Commenting infrastructure for Plone"
directory="profiles/default"
provides="Products.GenericSetup.interfaces.EXTENSION"
for="Products.CMFPlone.interfaces.IPloneSiteRoot"
/>
<!-- Comments -->
<class class=".comment.Comment">
<require interface=".interfaces.IComment" permission="zope2.View" />
<require attributes="Title Creator getId getText" permission="zope2.View" />
</class>
<utility
component=".comment.CommentFactory"
name="plone.Comment"
/>
<!-- Conversations -->
<class class=".conversation.Conversation">
<require interface=".interfaces.IConversation" permission="zope2.View" />
</class>
<adapter factory=".conversation.conversationAdapterFactory" />
<adapter factory=".conversation.ConversationReplies" />
<adapter factory=".conversation.CommentReplies" />
<!-- Event subscribers -->
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectAddedEvent"
handler=".comment.notify_workflow"
/>
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectAddedEvent"
handler=".comment.notify_content_object"
/>
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectRemovedEvent"
handler=".comment.notify_content_object"
/>
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectAddedEvent"
handler=".tool.index_object"
/>
<subscriber
for="plone.app.discussion.interfaces.IComment
zope.app.container.interfaces.IObjectRemovedEvent"
handler=".tool.unindex_object"
/>
<!-- Captcha Vocabulary -->
<utility component=".vocabularies.captcha_vocabulary"
name="plone.app.discussion.vocabularies.CaptchaVocabulary" />
<!-- Conversation indexes -->
<adapter name="total_comments" factory=".catalog.total_comments" />
<adapter name="last_comment_date" factory=".catalog.last_comment_date" />
<adapter name="commentators" factory=".catalog.commentators" />
<adapter name="in_response_to" factory=".catalog.in_response_to" />
<!-- Comment indexes -->
<adapter name="Title" factory=".catalog.title" />
<adapter name="Creator" factory=".catalog.creator" />
<adapter name="Description" factory=".catalog.description" />
<adapter name="SearchableText" factory=".catalog.searchable_text" />
<adapter name="effective" factory=".catalog.effective" />
<adapter name="created" factory=".catalog.created" />
<adapter name="modified" factory=".catalog.modified" />
<adapter name="total_comments" factory=".catalog.comments_total_comments" />
<adapter name="last_comment_date" factory=".catalog.comments_last_comment_date" />
<adapter name="commentators" factory=".catalog.comments_commentators" />
</configure>