1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
|
<!-- Copyright 2009 Canonical Ltd. This software is licensed under the
GNU Affero General Public License version 3 (see the file LICENSE).
-->
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:webservice="http://namespaces.canonical.com/webservice"
xmlns:lp="http://namespaces.canonical.com/lp"
i18n_domain="launchpad">
<include package=".browser" />
<publisher
name="answers"
factory="lp.answers.publisher.answers_request_publication_factory"/>
<utility
component="lp.answers.publisher.AnswersLayer"
provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
name="answers" />
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectCreatedEvent"
handler=".notification.QuestionAddedNotification"
/>
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectCreatedEvent"
handler=".notification.QuestionUnsupportedLanguageNotification"
/>
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectModifiedEvent"
handler=".notification.QuestionModifiedDefaultNotification"
/>
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectModifiedEvent"
handler=".notification.QuestionModifiedOwnerNotification"
/>
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectCreatedEvent"
handler=".karma.question_created"
/>
<subscriber
for=".interfaces.question.IQuestion
lazr.lifecycle.interfaces.IObjectModifiedEvent"
handler=".karma.question_modified"
/>
<subscriber
for=".interfaces.questionmessage.IQuestionMessage
lazr.lifecycle.interfaces.IObjectCreatedEvent"
handler=".karma.question_comment_added"
/>
<class class=".model.questionreopening.QuestionReopening">
<allow
interface=".interfaces.questionreopening.IQuestionReopening"
/>
</class>
<class class=".model.questionjob.QuestionEmailJob">
<allow interface=".interfaces.questionjob.IQuestionEmailJob"/>
</class>
<securedutility
component=".model.questionjob.QuestionEmailJob"
provides=".interfaces.questionjob.IQuestionEmailJobSource">
<allow interface=".interfaces.questionjob.IQuestionEmailJobSource"/>
</securedutility>
<!-- QuestionSubscription -->
<class class=".model.questionsubscription.QuestionSubscription">
<allow
interface=".interfaces.questionsubscription.IQuestionSubscription"
/>
<require
permission="zope.Public"
set_schema=".interfaces.questionsubscription.IQuestionSubscription"
/>
</class>
<class class=".model.question.Question">
<!-- IQuestion -->
<allow
attributes="id title description status priority owner assignee
answerer answer datecreated datedue datelastquery
datelastresponse date_solved faq language messages
whiteboard product distribution sourcepackagename
target can_be_reopened reopenings canReject
can_request_info can_give_info can_give_answer
can_confirm_answer can_reopen
subscriptions isSubscribed getRecipients
direct_recipients indirect_recipients
getDirectSubscribers getIndirectSubscribers"
/>
<require
permission="launchpad.Owner"
attributes="giveInfo reopen confirmAnswer"
/>
<require
permission="launchpad.AnyPerson"
attributes="requestInfo giveAnswer expireQuestion addComment
addCommentWithoutNotify linkFAQ subscribe unsubscribe"
set_attributes="title description datedue target language"
/>
<require
permission="launchpad.Append"
attributes="reject"
set_attributes="assignee"
/>
<require
permission="launchpad.Moderate"
attributes="setCommentVisibility"
/>
<require
permission="launchpad.Admin"
attributes="setStatus"
set_attributes="priority whiteboard"
/>
<!-- IBugLinkTarget -->
<allow attributes="bugs bug_links" />
<require
permission="launchpad.AnyPerson"
attributes="linkBug unlinkBug"
/>
</class>
<class class=".model.questionmessage.QuestionMessage">
<allow interface=".interfaces.questionmessage.IQuestionMessage"/>
</class>
<class class=".model.questionsperson.QuestionsPerson">
<allow interface=".interfaces.questionsperson.IQuestionsPerson"/>
</class>
<adapter
for="lp.registry.interfaces.person.IPerson"
provides=".interfaces.questionsperson.IQuestionsPerson"
factory=".model.questionsperson.QuestionsPerson"
trusted="yes"
/>
<adapter
for=".interfaces.question.IQuestion"
provides=".interfaces.questiontarget.IQuestionTarget"
factory=".adapters.question_to_questiontarget"
/>
<adapter
for=".interfaces.question.IQuestion"
provides=".interfaces.faqtarget.IFAQTarget"
factory=".adapters.question_to_faqtarget"
/>
<adapter
provides=".interfaces.faqtarget.IFAQTarget"
for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
factory=".adapters.distrosourcepackage_to_faqtarget"
/>
<adapter
for="lp.registry.interfaces.distroseries.IDistroSeries"
provides=".interfaces.questiontarget.IQuestionTarget"
factory=".adapters.series_to_questiontarget"
/>
<adapter
for="lp.registry.interfaces.productseries.IProductSeries"
provides=".interfaces.questiontarget.IQuestionTarget"
factory=".adapters.series_to_questiontarget"
/>
<adapter
for="lp.soyuz.interfaces.sourcepackagerelease.ISourcePackageRelease"
provides=".interfaces.questiontarget.IQuestionTarget"
factory=".adapters.sourcepackagerelease_to_questiontarget"
/>
<adapter
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
provides=".interfaces.questiontarget.IQuestionTarget"
factory=".adapters.sourcepackage_to_questiontarget"
/>
<adapter
provides=".interfaces.faqtarget.IFAQTarget"
for="lp.registry.interfaces.sourcepackage.ISourcePackage"
factory=".adapters.sourcepackage_to_faqtarget"
/>
<!-- QuestionSet -->
<class class=".model.question.QuestionSet">
<allow interface=".interfaces.questioncollection.IQuestionSet" />
</class>
<securedutility
class=".model.question.QuestionSet"
provides=".interfaces.questioncollection.IQuestionSet"
>
<allow interface=".interfaces.questioncollection.IQuestionSet" />
</securedutility>
<class class=".model.faq.FAQ">
<!-- IFAQ-->
<allow interface=".interfaces.faq.IFAQ" />
<require
permission="launchpad.Edit"
set_attributes="title keywords content
last_updated_by date_last_updated"
/>
</class>
<adapter
for=".interfaces.faq.IFAQ"
provides=".interfaces.faqtarget.IFAQTarget"
factory=".adapters.faq_to_faqtarget"
/>
<subscriber
for=".interfaces.faq.IFAQ
lazr.lifecycle.interfaces.IObjectModifiedEvent"
handler=".subscribers.update_last_updated"
/>
<subscriber
for=".interfaces.faq.IFAQ
lazr.lifecycle.interfaces.IObjectCreatedEvent"
handler=".karma.faq_created"
/>
<subscriber
for=".interfaces.faq.IFAQ
lazr.lifecycle.interfaces.IObjectModifiedEvent"
handler=".karma.faq_edited"
/>
<!-- IFAQSet -->
<securedutility
class=".model.faq.FAQSet"
provides=".interfaces.faq.IFAQSet"
>
<allow interface=".interfaces.faq.IFAQSet" />
</securedutility>
<securedutility
name="FAQ"
component=".vocabulary.FAQVocabulary"
provides="zope.schema.interfaces.IVocabularyFactory"
>
<allow interface="zope.schema.interfaces.IVocabularyFactory"/>
</securedutility>
<class class=".vocabulary.FAQVocabulary">
<allow interface="canonical.launchpad.webapp.vocabulary.IHugeVocabulary"/>
</class>
<lp:help-folder
folder="help" type="lp.answers.publisher.AnswersLayer" />
<adapter
name="answers"
provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
for="lp.answers.interfaces.questiontarget.IQuestionTarget"
factory="lp.answers.browser.questiontarget.AnswersVHostBreadcrumb"
permission="zope.Public"/>
<adapter
name="answers"
provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
for="lp.registry.interfaces.projectgroup.IProjectGroup"
factory="lp.answers.browser.questiontarget.AnswersVHostBreadcrumb"
permission="zope.Public"/>
<adapter
name="answers"
provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
for="lp.registry.interfaces.person.IPerson"
factory="lp.answers.browser.questiontarget.AnswersVHostBreadcrumb"
permission="zope.Public"/>
<webservice:register module="lp.answers.interfaces.webservice" />
</configure>
|