~launchpad-pqm/launchpad/devel

11647.1.5 by Curtis Hovey
Updated copyright.
1
<!-- Copyright 2009-2010 Canonical Ltd.  This software is licensed under the
8687.15.30 by Karl Fogel
Add the license header block to all .zcml files.
2
     GNU Affero General Public License version 3 (see the file LICENSE).
3
-->
4
8138.1.2 by Jonathan Lange
Run migrater over lp.code. Many tests broken and imports failing.
5
<configure
6
    xmlns="http://namespaces.zope.org/zope"
7
    xmlns:browser="http://namespaces.zope.org/browser"
8
    xmlns:i18n="http://namespaces.zope.org/i18n"
8294.7.4 by Francis J. Lacoste
Define all help folders using ZCML only.
9
    xmlns:lp="http://namespaces.canonical.com/lp"
8138.1.2 by Jonathan Lange
Run migrater over lp.code. Many tests broken and imports failing.
10
    xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
8590.1.1 by Tim Penhey
Move diffs into lp/code
11
    xmlns:webservice="http://namespaces.canonical.com/webservice"
8138.1.2 by Jonathan Lange
Run migrater over lp.code. Many tests broken and imports failing.
12
    i18n_domain="launchpad">
8225.3.2 by Tim Penhey
Sort the imports.
13
  <include package=".browser"/>
11573.4.1 by Michael Hudson
move branch vocabularies to lp.code.vocabularies
14
  <include package=".vocabularies"/>
7675.708.14 by Tim Penhey
Add canBeUnsubscribedByUser to BranchSubscription, and start to move the code security files.
15
  <authorizations module="lp.code.security" />
8225.3.2 by Tim Penhey
Sort the imports.
16
11128.5.2 by Michael Hudson
add code publication
17
  <publisher
11388.1.6 by Tim Penhey
Change the test to register the views against IDefaultBrowserLayer instead of IHttpRequest.
18
      name="code"
19
      factory="lp.code.publisher.code_request_publication_factory"/>
20
  <utility
21
      component="lp.code.publisher.CodeLayer"
22
      provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
23
      name="code" />
11128.5.2 by Michael Hudson
add code publication
24
7675.887.33 by Paul Hummer
Added zcml for BranchMergeQueue
25
  <!-- Branch Merge Queues -->
7675.887.53 by Paul Hummer
Made the factory use the secured utility
26
  <securedutility
27
     component="lp.code.model.branchmergequeue.BranchMergeQueue"
28
     provides="lp.code.interfaces.branchmergequeue.IBranchMergeQueueSource">
29
    <allow interface="lp.code.interfaces.branchmergequeue.IBranchMergeQueueSource"/>
30
31
  </securedutility>
32
7675.887.33 by Paul Hummer
Added zcml for BranchMergeQueue
33
  <class class="lp.code.model.branchmergequeue.BranchMergeQueue">
7675.887.49 by Paul Hummer
Specified more permissions for IBranchMergeQueue
34
    <require permission="zope.Public"
35
             attributes="registrant owner name description configuration
36
                         date_created branches" />
37
    <require permission="launchpad.Edit"
38
             attributes="setMergeQueueConfig"
39
             set_attributes="owner name description configuration" />
7675.887.33 by Paul Hummer
Added zcml for BranchMergeQueue
40
  </class>
41
8590.1.4 by Tim Penhey
Tests pass\!
42
  <class class="lp.code.model.codereviewvote.CodeReviewVoteReference">
7675.430.3 by Tim Penhey
Move the claimReview method to the CodeReviewVoteReference.
43
    <allow interface="lp.code.interfaces.codereviewvote.ICodeReviewVoteReferencePublic"/>
10667.4.12 by Michael Nelson
Moved generateSlaveBuildCookie to IBuildFarmJobDerived (due to its assumption of self.job) and updated the various *Job configurations to allow that interface.
44
    <require
7675.430.3 by Tim Penhey
Move the claimReview method to the CodeReviewVoteReference.
45
        permission="launchpad.Edit"
7675.429.12 by Tim Penhey
Allow the deletion of pending reviews.
46
        interface="lp.code.interfaces.codereviewvote.ICodeReviewVoteReferenceEdit"/>
8225.3.2 by Tim Penhey
Sort the imports.
47
  </class>
48
  <subscriber
49
      for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
50
           lp.code.interfaces.event.IReviewerNominatedEvent"
7675.624.15 by Tim Penhey
Move the event subscribers into the subscriber package.
51
      handler="lp.code.subscribers.branchmergeproposal.review_requested"/>
8225.3.2 by Tim Penhey
Sort the imports.
52
53
  <!-- CodeImportMachine -->
54
8590.1.4 by Tim Penhey
Tests pass\!
55
  <class class="lp.code.model.codeimportmachine.CodeImportMachine">
8225.3.2 by Tim Penhey
Sort the imports.
56
    <implements interface="lp.code.interfaces.codeimportmachine.ICodeImportMachine"/>
57
    <allow attributes="
58
                    id
59
                    state
60
                    hostname
61
                    current_jobs
62
                    date_created
63
                    heartbeat
64
                    events
65
                    shouldLookForJob"/>
66
    <require permission="launchpad.Edit"
67
             attributes="
68
                         setOnline
69
                         setOffline
70
                         setQuiescing"/>
71
72
    <!-- ICodeImportMachine has no set_schema, because all modifications
73
         should be done through methods that create CodeImportEvent objects when
74
         appropriate. -->
75
  </class>
76
77
  <!-- CodeImportMachineSet -->
78
79
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
80
      class="lp.code.model.codeimportmachine.CodeImportMachineSet"
8225.3.2 by Tim Penhey
Sort the imports.
81
      provides="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet">
82
    <allow interface="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet"/>
83
  </securedutility>
84
85
  <!-- BranchRef -->
86
87
  <class class="lp.code.browser.branchref.BranchRef">
88
    <allow interface="lp.code.interfaces.branchref.IBranchRef"/>
89
  </class>
90
91
  <!-- static content view -->
92
93
  <class class="lp.code.browser.branchref.StaticContentView">
94
    <allow attributes="browserDefault
95
                       __call__"/>
96
  </class>
7675.906.1 by Ian Booth
Initial prototype
97
  <class class="lp.code.model.branchmergequeuecollection.GenericBranchMergeQueueCollection">
98
    <allow interface="lp.code.interfaces.branchmergequeuecollection.IBranchMergeQueueCollection"/>
99
  </class>
7675.906.5 by Ian Booth
Finish view and add unit tests
100
  <class class="lp.code.model.branchmergequeuecollection.VisibleBranchMergeQueueCollection">
101
    <allow interface="lp.code.interfaces.branchmergequeuecollection.IBranchMergeQueueCollection"/>
102
  </class>
8225.3.2 by Tim Penhey
Sort the imports.
103
  <class class="lp.code.model.branchcollection.GenericBranchCollection">
104
    <allow interface="lp.code.interfaces.branchcollection.IBranchCollection"/>
105
  </class>
8301.1.2 by Jonathan Lange
Separate class for anonymous branches. May improve performance.
106
  <class class="lp.code.model.branchcollection.AnonymousBranchCollection">
107
    <allow interface="lp.code.interfaces.branchcollection.IBranchCollection"/>
108
  </class>
8225.3.2 by Tim Penhey
Sort the imports.
109
  <class class="lp.code.model.branchcollection.VisibleBranchCollection">
110
    <allow interface="lp.code.interfaces.branchcollection.IBranchCollection"/>
111
  </class>
112
  <adapter
113
      for="storm.store.Store"
114
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
115
      factory="lp.code.model.branchcollection.GenericBranchCollection"/>
8555.1.13 by Tim Penhey
Register adapters for IPerson, IProduct and IProject to IBranchCollection.
116
  <adapter
117
      for="lp.registry.interfaces.person.IPerson"
118
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
119
      factory="lp.code.adapters.branchcollection.branch_collection_for_person"/>
120
  <adapter
121
      for="lp.registry.interfaces.product.IProduct"
122
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
123
      factory="lp.code.adapters.branchcollection.branch_collection_for_product"/>
124
  <adapter
13001.2.1 by Aaron Bentley
Support +merges on PersonProduct.
125
      for="lp.registry.interfaces.personproduct.IPersonProduct"
126
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
127
      factory="lp.code.adapters.branchcollection.branch_collection_for_person_product"/>
128
  <adapter
10326.1.2 by Henning Eggers
Renamed project interfaces module to projectgroup.
129
      for="lp.registry.interfaces.projectgroup.IProjectGroup"
8555.1.13 by Tim Penhey
Register adapters for IPerson, IProduct and IProject to IBranchCollection.
130
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
131
      factory="lp.code.adapters.branchcollection.branch_collection_for_project"/>
8728.1.8 by Tim Penhey
More adapters to branch collections.
132
  <adapter
8728.4.1 by Tim Penhey
Add the view that is used by the branch-count-summary page template and register the view against many objects.
133
      for="lp.registry.interfaces.distribution.IDistribution"
134
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
135
      factory="lp.code.adapters.branchcollection.branch_collection_for_distribution"/>
136
  <adapter
137
      for="lp.registry.interfaces.distroseries.IDistroSeries"
138
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
139
      factory="lp.code.adapters.branchcollection.branch_collection_for_distro_series"/>
140
  <adapter
8728.1.8 by Tim Penhey
More adapters to branch collections.
141
      for="lp.registry.interfaces.sourcepackage.ISourcePackage"
142
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
143
      factory="lp.code.adapters.branchcollection.branch_collection_for_source_package"/>
144
  <adapter
145
      for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
146
      provides="lp.code.interfaces.branchcollection.IBranchCollection"
147
      factory="lp.code.adapters.branchcollection.branch_collection_for_distro_source_package"/>
8225.3.2 by Tim Penhey
Sort the imports.
148
  <securedutility
149
      class="lp.code.model.branchcollection.GenericBranchCollection"
150
      provides="lp.code.interfaces.branchcollection.IAllBranches">
151
    <allow interface="lp.code.interfaces.branchcollection.IAllBranches"/>
152
  </securedutility>
8786.1.2 by Tim Penhey
Write enough to get the tests passing.
153
  <class class="lp.code.model.revisioncache.GenericRevisionCollection">
154
    <allow interface="lp.code.interfaces.revisioncache.IRevisionCollection"/>
155
  </class>
156
  <securedutility
157
      class="lp.code.model.revisioncache.GenericRevisionCollection"
158
      provides="lp.code.interfaces.revisioncache.IRevisionCache">
159
    <allow interface="lp.code.interfaces.revisioncache.IRevisionCache"/>
160
  </securedutility>
7675.906.1 by Ian Booth
Initial prototype
161
  <securedutility
162
      class="lp.code.model.branchmergequeuecollection.GenericBranchMergeQueueCollection"
163
      provides="lp.code.interfaces.branchmergequeuecollection.IAllBranchMergeQueues">
164
    <allow interface="lp.code.interfaces.branchmergequeuecollection.IAllBranchMergeQueues"/>
165
  </securedutility>
166
  <adapter
167
      for="lp.registry.interfaces.person.IPerson"
8728.2.3 by Tim Penhey
Add adapters for objects to IRevisionCache.
168
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
169
      factory="lp.code.adapters.revisioncache.revision_cache_for_person"/>
170
  <adapter
171
      for="lp.registry.interfaces.product.IProduct"
172
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
173
      factory="lp.code.adapters.revisioncache.revision_cache_for_product"/>
174
  <adapter
10326.1.2 by Henning Eggers
Renamed project interfaces module to projectgroup.
175
      for="lp.registry.interfaces.projectgroup.IProjectGroup"
8728.2.3 by Tim Penhey
Add adapters for objects to IRevisionCache.
176
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
177
      factory="lp.code.adapters.revisioncache.revision_cache_for_project"/>
178
  <adapter
8728.4.1 by Tim Penhey
Add the view that is used by the branch-count-summary page template and register the view against many objects.
179
      for="lp.registry.interfaces.distribution.IDistribution"
180
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
181
      factory="lp.code.adapters.revisioncache.revision_cache_for_distribution"/>
182
  <adapter
183
      for="lp.registry.interfaces.distroseries.IDistroSeries"
184
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
185
      factory="lp.code.adapters.revisioncache.revision_cache_for_distro_series"/>
186
  <adapter
8728.2.3 by Tim Penhey
Add adapters for objects to IRevisionCache.
187
      for="lp.registry.interfaces.sourcepackage.ISourcePackage"
188
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
189
      factory="lp.code.adapters.revisioncache.revision_cache_for_source_package"/>
190
  <adapter
191
      for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
192
      provides="lp.code.interfaces.revisioncache.IRevisionCache"
193
      factory="lp.code.adapters.revisioncache.revision_cache_for_distro_source_package"/>
8225.3.2 by Tim Penhey
Sort the imports.
194
  <securedutility
195
      class="lp.code.model.branchpuller.BranchPuller"
196
      provides="lp.code.interfaces.branchpuller.IBranchPuller">
197
    <allow interface="lp.code.interfaces.branchpuller.IBranchPuller"/>
198
  </securedutility>
199
  <securedutility
200
      class="canonical.launchpad.systemhomes.BazaarApplication"
10409.5.77 by Curtis Hovey
Fix the path to the I*Applications classes.
201
      provides="canonical.launchpad.interfaces.launchpad.IBazaarApplication">
202
    <allow interface="canonical.launchpad.interfaces.launchpad.IBazaarApplication"/>
8225.3.2 by Tim Penhey
Sort the imports.
203
  </securedutility>
204
205
  <!-- pages for the bazaar application -->
206
207
  <xmlrpc:view
10409.5.77 by Curtis Hovey
Fix the path to the I*Applications classes.
208
      for="canonical.launchpad.interfaces.launchpad.IBazaarApplication"
11882.2.5 by Jonathan Lange
Kill xmlrpc re-exports as well.
209
      interface="lp.code.xmlrpc.branch.IBranchSetAPI"
210
      class="lp.code.xmlrpc.branch.BranchSetAPI"
8225.3.2 by Tim Penhey
Sort the imports.
211
      permission="launchpad.AnyPerson"/>
212
  <xmlrpc:view
10409.5.77 by Curtis Hovey
Fix the path to the I*Applications classes.
213
      for="canonical.launchpad.interfaces.launchpad.IBazaarApplication"
11882.2.5 by Jonathan Lange
Kill xmlrpc re-exports as well.
214
      interface="lp.code.xmlrpc.branch.IPublicCodehostingAPI"
215
      class="lp.code.xmlrpc.branch.PublicCodehostingAPI"
8225.3.2 by Tim Penhey
Sort the imports.
216
      permission="zope.Public"/>
217
218
  <!-- Branch Merge Proposal -->
219
8590.1.4 by Tim Penhey
Tests pass\!
220
  <class class="lp.code.model.branchmergeproposal.BranchMergeProposal">
8225.3.2 by Tim Penhey
Sort the imports.
221
    <allow attributes="
222
                    address
223
                    id
224
                    registrant
225
                    source_branch
226
                    target_branch
7675.343.1 by Aaron Bentley
Rename dependent branch to prerequisite branch.
227
                    prerequisite_branch
7675.548.1 by Tim Penhey
Add a description for the merge proposal.
228
                    description
8225.3.2 by Tim Penhey
Sort the imports.
229
                    whiteboard
230
                    queue_status
9373.2.1 by Aaron Bentley
Implement IPrivacy for BranchMergeProposal.
231
                    private
8225.3.2 by Tim Penhey
Sort the imports.
232
                    reviewer
233
                    reviewed_revision_id
234
                    queuer
235
                    queue_position
236
                    queued_revision_id
237
                    commit_message
238
                    date_queued
239
                    merged_revno
240
                    date_merged
241
                    merge_reporter
242
                    supersedes
243
                    superseded_by
244
                    title
245
                    date_created
246
                    date_review_requested
247
                    date_reviewed
10054.23.1 by Aaron Bentley
Merged stable into jobstatus.
248
                    next_preview_diff_job
8225.3.2 by Tim Penhey
Sort the imports.
249
                    preview_diff
11486.5.6 by Aaron Bentley
Implement getIncrementalDiffs.
250
                    getIncrementalDiffs
8225.3.2 by Tim Penhey
Sort the imports.
251
                    votes
252
                    all_comments
12505.6.1 by Ian Booth
Remove DecoratedBug and refactor mp linked_bugs to use branch.getRelatedBugTasks
253
                    getRelatedBugTasks
11486.2.7 by Aaron Bentley
Move revision selection to model code.
254
                    revision_end_date
8225.3.2 by Tim Penhey
Sort the imports.
255
                    isMergable
256
                    getComment
11486.2.7 by Aaron Bentley
Move revision selection to model code.
257
                    getRevisionsSinceReviewStart
8225.3.2 by Tim Penhey
Sort the imports.
258
                    getNotificationRecipients
259
                    getVoteReference
260
                    isValidTransition
261
                    getUnlandedSourceBranchRevisions
262
                    root_message_id
11486.5.2 by Aaron Bentley
Refactor incremental diff generation.
263
                    getUsersVoteReference
264
                    generateIncrementalDiff"/>
8225.3.2 by Tim Penhey
Sort the imports.
265
    <allow interface="lp.code.interfaces.branchtarget.IHasBranchTarget"/>
266
    <require
267
        permission="launchpad.Edit"
7675.548.1 by Tim Penhey
Add a description for the merge proposal.
268
        set_attributes="description whiteboard merged_revno commit_message
13912.1.1 by William Grant
really drop review_diff from the rest of the code.
269
                        root_message_id prerequisite_branch"
8225.3.2 by Tim Penhey
Sort the imports.
270
        attributes="
271
                    deleteProposal
8879.3.7 by Paul Hummer
Changed the method to setStatus
272
                    setStatus
8225.3.2 by Tim Penhey
Sort the imports.
273
                    setAsWorkInProgress
274
                    requestReview
275
                    approveBranch
276
                    rejectBranch
277
                    markAsMerged
278
                    resubmit
279
                    enqueue
280
                    dequeue
281
                    moveToFrontOfQueue
282
                    nominateReviewer
283
                    updatePreviewDiff"/>
284
    <require
285
        permission="launchpad.AnyPerson"
7675.430.3 by Tim Penhey
Move the claimReview method to the CodeReviewVoteReference.
286
        attributes="createComment
8225.3.2 by Tim Penhey
Sort the imports.
287
                    createCommentFromMessage"/>
288
  </class>
9737.2.5 by Tim Penhey
Make an xhtml renderer adapter for the commit_message.
289
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
290
  <!-- Branch Merge Proposal Jobs -->
9737.2.5 by Tim Penhey
Make an xhtml renderer adapter for the commit_message.
291
8590.1.2 by Tim Penhey
Break out the jobs from the merge proposal module.
292
  <class class="lp.code.model.branchmergeproposaljob.CreateMergeProposalJob">
12929.9.6 by j.c.sackett
Fixed typos.
293
    <allow interface="lp.services.messages.interfaces.message.IMessageJob"/>
8225.3.2 by Tim Penhey
Sort the imports.
294
    <allow interface="lp.code.interfaces.branchmergeproposal.ICreateMergeProposalJob"/>
295
  </class>
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
296
  <securedutility
297
      component="lp.code.model.branchmergeproposaljob.CreateMergeProposalJob"
298
      provides="lp.code.interfaces.branchmergeproposal.ICreateMergeProposalJobSource">
299
    <allow interface="lp.code.interfaces.branchmergeproposal.ICreateMergeProposalJobSource"/>
300
  </securedutility>
301
11733.1.3 by Tim Penhey
Copied and pasted wrong name. D'oh.
302
  <class class="lp.code.model.branchmergeproposaljob.MergeProposalNeedsReviewEmailJob">
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
303
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob"/>
11733.1.3 by Tim Penhey
Copied and pasted wrong name. D'oh.
304
    <allow interface="lp.code.interfaces.branchmergeproposal.IMergeProposalNeedsReviewEmailJob"/>
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
305
  </class>
306
  <securedutility
11733.1.3 by Tim Penhey
Copied and pasted wrong name. D'oh.
307
      component="lp.code.model.branchmergeproposaljob.MergeProposalNeedsReviewEmailJob"
308
      provides="lp.code.interfaces.branchmergeproposal.IMergeProposalNeedsReviewEmailJobSource">
309
    <allow interface="lp.code.interfaces.branchmergeproposal.IMergeProposalNeedsReviewEmailJobSource"/>
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
310
  </securedutility>
311
312
  <securedutility
313
      component="lp.code.model.branchmergeproposaljob.BranchMergeProposalJobSource"
314
      provides="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJobSource">
315
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJobSource"/>
316
  </securedutility>
317
11486.4.16 by Aaron Bentley
Ensure merge-proposal-jobs.py runs GenerateIncrementalDiffJobs.
318
  <class
319
  class="lp.code.model.branchmergeproposaljob.GenerateIncrementalDiffJob">
320
    <allow interface="lp.code.interfaces.branchmergeproposal.IGenerateIncrementalDiffJob"/>
321
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob" />
322
  </class>
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
323
  <class class="lp.code.model.branchmergeproposaljob.UpdatePreviewDiffJob">
7675.624.49 by Tim Penhey
Not yet passing, but getting close.
324
    <allow interface="lp.code.interfaces.branchmergeproposal.IUpdatePreviewDiffJob" />
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
325
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob" />
326
  </class>
327
  <securedutility
328
      component="lp.code.model.branchmergeproposaljob.UpdatePreviewDiffJob"
329
      provides="lp.code.interfaces.branchmergeproposal.IUpdatePreviewDiffJobSource">
330
    <allow interface="lp.code.interfaces.branchmergeproposal.IUpdatePreviewDiffJobSource"/>
331
  </securedutility>
332
333
  <class class="lp.code.model.branchmergeproposaljob.CodeReviewCommentEmailJob">
7675.624.41 by Tim Penhey
Tests for the new job source.
334
    <allow interface="lp.code.interfaces.branchmergeproposal.ICodeReviewCommentEmailJob" />
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
335
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob" />
336
  </class>
337
  <securedutility
338
      component="lp.code.model.branchmergeproposaljob.CodeReviewCommentEmailJob"
339
      provides="lp.code.interfaces.branchmergeproposal.ICodeReviewCommentEmailJobSource">
340
    <allow interface="lp.code.interfaces.branchmergeproposal.ICodeReviewCommentEmailJobSource"/>
341
  </securedutility>
342
343
  <class class="lp.code.model.branchmergeproposaljob.ReviewRequestedEmailJob">
7675.624.41 by Tim Penhey
Tests for the new job source.
344
    <allow interface="lp.code.interfaces.branchmergeproposal.IReviewRequestedEmailJob" />
7675.624.22 by Tim Penhey
Group the configure zcml for the branch merge proposal jobs together.
345
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob" />
346
  </class>
347
  <securedutility
348
      component="lp.code.model.branchmergeproposaljob.ReviewRequestedEmailJob"
349
      provides="lp.code.interfaces.branchmergeproposal.IReviewRequestedEmailJobSource">
350
    <allow interface="lp.code.interfaces.branchmergeproposal.IReviewRequestedEmailJobSource"/>
351
  </securedutility>
352
353
  <class class="lp.code.model.branchmergeproposaljob.MergeProposalUpdatedEmailJob">
354
    <allow interface="lp.services.job.interfaces.job.IRunnableJob" />
355
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalJob" />
356
  </class>
357
  <securedutility
358
      component="lp.code.model.branchmergeproposaljob.MergeProposalUpdatedEmailJob"
359
      provides="lp.code.interfaces.branchmergeproposal.IMergeProposalUpdatedEmailJobSource">
360
    <allow interface="lp.code.interfaces.branchmergeproposal.IMergeProposalUpdatedEmailJobSource"/>
361
  </securedutility>
362
363
  <!-- Branch Merge Proposal Subscribers -->
364
8225.3.2 by Tim Penhey
Sort the imports.
365
  <subscriber
366
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
367
           lp.code.interfaces.event.INewBranchMergeProposalEvent"
7675.624.15 by Tim Penhey
Move the event subscribers into the subscriber package.
368
      handler="lp.code.subscribers.branchmergeproposal.merge_proposal_created"/>
8225.3.2 by Tim Penhey
Sort the imports.
369
  <subscriber
370
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
11733.1.4 by Tim Penhey
Add an extra event for the needs review, but keep the same functionality for now.
371
           lp.code.interfaces.event.IBranchMergeProposalNeedsReviewEvent"
372
      handler="lp.code.subscribers.branchmergeproposal.merge_proposal_needs_review"/>
373
  <subscriber
374
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
8225.3.2 by Tim Penhey
Sort the imports.
375
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
7675.624.15 by Tim Penhey
Move the event subscribers into the subscriber package.
376
      handler="lp.code.subscribers.branchmergeproposal.merge_proposal_modified"/>
8225.3.2 by Tim Penhey
Sort the imports.
377
  <subscriber
378
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
379
           lp.code.interfaces.event.INewBranchMergeProposalEvent"
8225.3.2 by Tim Penhey
Sort the imports.
380
      handler="canonical.launchpad.subscribers.karma.branch_merge_proposed"/>
381
  <subscriber
382
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
383
           lp.code.interfaces.event.IBranchMergeProposalStatusChangeEvent"
8225.3.2 by Tim Penhey
Sort the imports.
384
      handler="canonical.launchpad.subscribers.karma.branch_merge_status_changed"/>
385
  <adapter
386
      for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal"
387
      provides="canonical.launchpad.webapp.interfaces.IPrimaryContext"
388
      factory="lp.code.browser.branchmergeproposal.BranchMergeProposalPrimaryContext"/>
389
390
  <!-- hierarchy -->
391
392
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
393
      class="lp.code.model.branchmergeproposal.BranchMergeProposalGetter"
8225.3.2 by Tim Penhey
Sort the imports.
394
      provides="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalGetter">
395
    <allow interface="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalGetter"/>
396
  </securedutility>
397
  <class
398
      class="lp.code.model.seriessourcepackagebranch.SeriesSourcePackageBranch">
399
    <allow interface="lp.code.interfaces.seriessourcepackagebranch.ISeriesSourcePackageBranch"/>
400
  </class>
8225.3.3 by Tim Penhey
Merge RF and resolve conflicts.
401
8225.3.2 by Tim Penhey
Sort the imports.
402
  <securedutility
8225.3.3 by Tim Penhey
Merge RF and resolve conflicts.
403
     class="lp.code.model.seriessourcepackagebranch.SeriesSourcePackageBranchSet"
404
     provides="lp.code.interfaces.seriessourcepackagebranch.IFindOfficialBranchLinks">
405
    <allow interface="lp.code.interfaces.seriessourcepackagebranch.IFindOfficialBranchLinks"/>
8225.3.2 by Tim Penhey
Sort the imports.
406
  </securedutility>
407
408
  <!-- CodeImportResult -->
409
8590.1.4 by Tim Penhey
Tests pass\!
410
  <class class="lp.code.model.codeimportresult.CodeImportResult">
8225.3.2 by Tim Penhey
Sort the imports.
411
    <allow interface="lp.code.interfaces.codeimportresult.ICodeImportResult"/>
412
  </class>
413
414
  <!-- CodeImportResultSet -->
415
416
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
417
      class="lp.code.model.codeimportresult.CodeImportResultSet"
8225.3.2 by Tim Penhey
Sort the imports.
418
      provides="lp.code.interfaces.codeimportresult.ICodeImportResultSet">
419
    <allow interface="lp.code.interfaces.codeimportresult.ICodeImportResultSet"/>
420
  </securedutility>
421
  <class class="lp.code.model.branchlookup.BranchLookup">
422
    <allow interface="lp.code.interfaces.branchlookup.IBranchLookup"/>
423
  </class>
424
  <securedutility
425
      class="lp.code.model.branchlookup.BranchLookup"
426
      provides="lp.code.interfaces.branchlookup.IBranchLookup">
427
    <allow interface="lp.code.interfaces.branchlookup.IBranchLookup"/>
428
  </securedutility>
429
  <securedutility
430
      class="lp.code.model.branchlookup.LinkedBranchTraverser"
431
      provides="lp.code.interfaces.branchlookup.ILinkedBranchTraverser">
432
    <allow interface="lp.code.interfaces.branchlookup.ILinkedBranchTraverser"/>
433
  </securedutility>
9719.2.16 by Michael Hudson
* don't do adapter registration at import time -- that might be too early
434
  <adapter factory="lp.code.model.branchlookup.ProductTraversable" />
435
  <adapter factory="lp.code.model.branchlookup.DistributionTraversable" />
436
  <adapter factory="lp.code.model.branchlookup.DistroSeriesTraversable" />
8225.3.2 by Tim Penhey
Sort the imports.
437
438
  <!-- BranchSubscription -->
439
8590.1.4 by Tim Penhey
Tests pass\!
440
  <class class="lp.code.model.branchsubscription.BranchSubscription">
8225.3.2 by Tim Penhey
Sort the imports.
441
    <allow interface="lp.code.interfaces.branchsubscription.IBranchSubscription"/>
442
    <allow interface="lp.code.interfaces.branchtarget.IHasBranchTarget"/>
443
    <require
444
        permission="zope.Public"
445
        set_schema="lp.code.interfaces.branchsubscription.IBranchSubscription"/>
446
  </class>
447
  <adapter
448
      for="lp.code.interfaces.branchsubscription.IBranchSubscription"
449
      provides="canonical.launchpad.webapp.interfaces.IPrimaryContext"
450
      factory="lp.code.browser.branchsubscription.BranchSubscriptionPrimaryContext"/>
451
452
  <!-- Branch -->
453
8377.8.11 by Tim Penhey
Missing method in the config.
454
  <class class="lp.code.model.branch.Branch">
8225.3.2 by Tim Penhey
Sort the imports.
455
    <require
456
        permission="launchpad.View"
11134.6.2 by Tim Penhey
More interface mangling.
457
        interface="canonical.launchpad.interfaces.launchpad.IPrivacy
458
                   lp.code.interfaces.branch.IBranchAnyone
11134.6.1 by Tim Penhey
Move methods into interfaces based on required permissions.
459
                   lp.code.interfaces.branch.IBranchEditableAttributes
11134.6.2 by Tim Penhey
More interface mangling.
460
                   lp.code.interfaces.branch.IBranchPublic
7675.887.43 by Paul Hummer
Exported the merge queue operations for IBranch
461
                   lp.code.interfaces.branch.IBranchView"
462
        attributes="merge_queue merge_queue_config"/>
8225.3.2 by Tim Penhey
Sort the imports.
463
    <require
464
        permission="launchpad.Edit"
11134.6.1 by Tim Penhey
Move methods into interfaces based on required permissions.
465
        interface="lp.code.interfaces.branch.IBranchEdit"
466
        set_schema="lp.code.interfaces.branch.IBranchEditableAttributes"
7675.887.43 by Paul Hummer
Exported the merge queue operations for IBranch
467
        attributes="setPrivate addToQueue setMergeQueueConfig"
11134.6.5 by Tim Penhey
Add other formats too.
468
        set_attributes="branch_format control_format repository_format
469
                        branch_type
11134.6.4 by Tim Penhey
Expose attributes explicity in the configure.zcml for attributes that are updated in tests.
470
                        last_scanned last_scanned_id
471
                        last_mirrored last_mirrored_id next_mirror_time
7675.887.43 by Paul Hummer
Exported the merge queue operations for IBranch
472
                        revision_count mirror_failures
11134.6.4 by Tim Penhey
Expose attributes explicity in the configure.zcml for attributes that are updated in tests.
473
                        stacked_on mirror_status_message"/>
8225.3.2 by Tim Penhey
Sort the imports.
474
    <require
475
        permission="launchpad.AnyPerson"
11134.6.1 by Tim Penhey
Move methods into interfaces based on required permissions.
476
        set_schema="lp.code.interfaces.branch.IBranchAnyone"/>
8225.3.2 by Tim Penhey
Sort the imports.
477
    <require
478
        permission="zope.Public"
11134.6.2 by Tim Penhey
More interface mangling.
479
        set_schema="lp.code.interfaces.branch.IBranchPublic"/>
8225.3.2 by Tim Penhey
Sort the imports.
480
  </class>
481
  <adapter
482
      for="lp.code.interfaces.branch.IBranch"
483
      provides="canonical.launchpad.webapp.interfaces.ILaunchpadContainer"
484
      factory="canonical.launchpad.components.launchpadcontainer.LaunchpadBranchContainer"/>
485
  <adapter
486
      for="lp.code.interfaces.branch.IBranch"
487
      provides="canonical.launchpad.webapp.badge.IHasBadges"
488
      factory="lp.code.browser.branchlisting.BranchBadges"/>
489
  <adapter
490
      for="lp.code.interfaces.branch.IBranch"
491
      provides="canonical.launchpad.webapp.interfaces.IPrimaryContext"
492
      factory="lp.code.model.branchtarget.branch_to_target"/>
493
494
  <subscriber
495
      for="lp.code.interfaces.branch.IBranch
496
           lazr.lifecycle.interfaces.IObjectCreatedEvent"
497
      handler="canonical.launchpad.subscribers.karma.branch_created"/>
10391.5.1 by Aaron Bentley
Use ZCML to hook up revision emailing.
498
  <subscriber
10391.5.6 by Aaron Bentley
Simplify subscriptions.
499
      for="lp.codehosting.scanner.events.ITipChanged"
10391.5.1 by Aaron Bentley
Use ZCML to hook up revision emailing.
500
      handler="lp.codehosting.scanner.email.queue_tip_changed_email_jobs"/>
10391.5.3 by Aaron Bentley
Use ZCML to subscribe send_removed_revision_emails.
501
  <subscriber
10391.5.8 by Aaron Bentley
Subscribe schedule_diff_updates and schedule_translation_upload with zcml
502
      for="lp.codehosting.scanner.events.ITipChanged"
503
      handler="lp.codehosting.scanner.bzrsync.schedule_diff_updates"/>
504
  <subscriber
505
      for="lp.codehosting.scanner.events.ITipChanged"
10391.5.9 by Aaron Bentley
Ensure schedule_translation_templates_build is subscribed to TipChanged.
506
      handler="lp.codehosting.scanner.bzrsync.schedule_translation_templates_build"/>
507
  <subscriber
508
      for="lp.codehosting.scanner.events.ITipChanged"
10391.5.8 by Aaron Bentley
Subscribe schedule_diff_updates and schedule_translation_upload with zcml
509
      handler="lp.codehosting.scanner.bzrsync.schedule_translation_upload"/>
510
  <subscriber
7675.727.4 by Aaron Bentley
Branch updates set is_stale.
511
      for="lp.codehosting.scanner.events.ITipChanged"
512
      handler="lp.codehosting.scanner.bzrsync.update_recipes"/>
513
  <subscriber
10391.5.6 by Aaron Bentley
Simplify subscriptions.
514
      for="lp.codehosting.scanner.events.IRevisionsRemoved"
10391.5.3 by Aaron Bentley
Use ZCML to subscribe send_removed_revision_emails.
515
      handler="lp.codehosting.scanner.email.send_removed_revision_emails"/>
10391.5.5 by Aaron Bentley
Ensure BugBranchLinker is subscribed to new revisions.
516
  <subscriber
517
      for="lp.codehosting.scanner.events.INewRevision"
518
      handler="lp.codehosting.scanner.buglinks.got_new_revision"/>
10391.5.7 by Aaron Bentley
Ensure merge detection is subscribed to ScanCompleted
519
  <subscriber
520
      for="lp.codehosting.scanner.events.IScanCompleted"
521
      handler="lp.codehosting.scanner.mergedetection.auto_merge_proposals"/>
522
  <subscriber
523
      for="lp.codehosting.scanner.events.IScanCompleted"
524
      handler="lp.codehosting.scanner.mergedetection.auto_merge_branches"/>
8225.3.2 by Tim Penhey
Sort the imports.
525
526
  <!-- BranchSet -->
527
8590.1.4 by Tim Penhey
Tests pass\!
528
  <class class="lp.code.model.branch.BranchSet">
8225.3.2 by Tim Penhey
Sort the imports.
529
    <allow interface="lp.code.interfaces.branch.IBranchSet"/>
530
  </class>
9372.1.1 by Tim Penhey
Start shifting the scattered queries to a single utility.
531
  <securedutility
532
      class="lp.code.model.branch.BranchSet"
533
      provides="lp.code.interfaces.branch.IBranchSet">
534
    <allow interface="lp.code.interfaces.branch.IBranchSet"/>
535
  </securedutility>
536
537
  <!-- BranchListingQueryOptimiser -->
538
539
  <class class="lp.code.model.branchlistingqueryoptimiser.BranchListingQueryOptimiser">
540
    <allow interface="lp.code.interfaces.branch.IBranchListingQueryOptimiser"/>
541
  </class>
542
  <securedutility
543
      class="lp.code.model.branchlistingqueryoptimiser.BranchListingQueryOptimiser"
544
      provides="lp.code.interfaces.branch.IBranchListingQueryOptimiser">
545
    <allow interface="lp.code.interfaces.branch.IBranchListingQueryOptimiser"/>
546
  </securedutility>
8225.3.2 by Tim Penhey
Sort the imports.
547
548
  <!-- BranchVisibilityPolicy -->
549
8590.1.4 by Tim Penhey
Tests pass\!
550
  <class class="lp.code.model.branchvisibilitypolicy.BranchVisibilityTeamPolicy">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
551
    <allow interface="lp.code.interfaces.branchvisibilitypolicy.IBranchVisibilityTeamPolicy"/>
8225.3.2 by Tim Penhey
Sort the imports.
552
  </class>
553
554
  <!-- BranchDelta -->
555
556
  <class class="lp.code.adapters.branch.BranchDelta">
557
    <allow interface="lp.code.interfaces.branch.IBranchDelta"/>
558
  </class>
559
  <securedutility
11435.5.1 by Tim Penhey
Extract the branch cloud into its own module.
560
      class="lp.code.model.branchcloud.BranchCloud"
8225.3.2 by Tim Penhey
Sort the imports.
561
      provides="lp.code.interfaces.branch.IBranchCloud">
562
    <allow interface="lp.code.interfaces.branch.IBranchCloud"/>
563
  </securedutility>
8777.4.1 by Jonathan Lange
Some kind of branch-wrapping object.
564
8225.3.2 by Tim Penhey
Sort the imports.
565
  <subscriber
566
      for="lp.code.interfaces.branch.IBranch
567
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
7675.171.10 by Tim Penhey
Have a single subscriber to the modified event do the field updating and call the method to send the branch email.
568
      handler="lp.code.model.branch.branch_modified_subscriber"/>
8377.6.10 by Tim Penhey
Move the code mailout classes.
569
  <class class="lp.code.mail.branch.RecipientReason">
8225.3.2 by Tim Penhey
Sort the imports.
570
    <allow attributes="
571
                    getReason
572
                    branch
573
                    mail_header
574
                    recipient
9184.4.2 by Tim Penhey
Don't add attachments for status only review email.
575
                    max_diff_lines
576
                    review_level"/>
8225.3.2 by Tim Penhey
Sort the imports.
577
  </class>
578
  <class class="lp.code.model.branchnamespace.PackageNamespace">
579
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespace"/>
8137.17.24 by Barry Warsaw
thread merge
580
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespacePolicy"/>
8225.3.2 by Tim Penhey
Sort the imports.
581
  </class>
582
  <class class="lp.code.model.branchnamespace.PersonalNamespace">
583
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespace"/>
8137.17.24 by Barry Warsaw
thread merge
584
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespacePolicy"/>
8225.3.2 by Tim Penhey
Sort the imports.
585
  </class>
586
  <class class="lp.code.model.branchnamespace.ProductNamespace">
587
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespace"/>
8137.17.24 by Barry Warsaw
thread merge
588
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespacePolicy"/>
8225.3.2 by Tim Penhey
Sort the imports.
589
  </class>
590
  <securedutility
591
      class="lp.code.model.branchnamespace.BranchNamespaceSet"
592
      provides="lp.code.interfaces.branchnamespace.IBranchNamespaceSet">
593
    <allow interface="lp.code.interfaces.branchnamespace.IBranchNamespaceSet"/>
594
  </securedutility>
595
  <class class="lp.code.model.branchtarget.PackageBranchTarget">
596
    <allow interface="lp.code.interfaces.branchtarget.IBranchTarget"/>
597
  </class>
598
  <adapter
599
      for="lp.registry.interfaces.sourcepackage.ISourcePackage"
600
      provides="lp.code.interfaces.branchtarget.IBranchTarget"
601
      factory="lp.code.model.branchtarget.PackageBranchTarget"/>
11270.2.14 by Tim Penhey
Add an adapter for distribution source package to branch target.
602
  <adapter
603
      for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage"
604
      provides="lp.code.interfaces.branchtarget.IBranchTarget"
605
      factory="lp.code.model.branchtarget.distribution_sourcepackage_to_branch_target"/>
606
8225.3.2 by Tim Penhey
Sort the imports.
607
  <class class="lp.code.model.branchtarget.PersonBranchTarget">
608
    <allow interface="lp.code.interfaces.branchtarget.IBranchTarget"/>
609
  </class>
610
  <adapter
611
      for="lp.registry.interfaces.person.IPerson"
612
      provides="lp.code.interfaces.branchtarget.IBranchTarget"
613
      factory="lp.code.model.branchtarget.PersonBranchTarget"/>
11270.2.14 by Tim Penhey
Add an adapter for distribution source package to branch target.
614
8225.3.2 by Tim Penhey
Sort the imports.
615
  <class class="lp.code.model.branchtarget.ProductBranchTarget">
616
    <allow interface="lp.code.interfaces.branchtarget.IBranchTarget"/>
617
  </class>
618
  <adapter
619
      for="lp.registry.interfaces.product.IProduct"
620
      provides="lp.code.interfaces.branchtarget.IBranchTarget"
621
      factory="lp.code.model.branchtarget.ProductBranchTarget"/>
622
  <adapter
11270.2.13 by Tim Penhey
Add an adapter from product series to branch target.
623
      for="lp.registry.interfaces.productseries.IProductSeries"
624
      provides="lp.code.interfaces.branchtarget.IBranchTarget"
625
      factory="lp.code.model.branchtarget.product_series_to_branch_target"/>
626
  <adapter
8225.3.2 by Tim Penhey
Sort the imports.
627
      for="lp.code.interfaces.branchtarget.IBranchTarget"
628
      provides="canonical.launchpad.webapp.interfaces.ICanonicalUrlData"
629
      factory="lp.code.model.branchtarget.get_canonical_url_data_for_target"/>
8590.1.4 by Tim Penhey
Tests pass\!
630
  <class class="lp.code.model.branchrevision.BranchRevision">
8225.3.2 by Tim Penhey
Sort the imports.
631
    <allow interface="lp.code.interfaces.branchrevision.IBranchRevision"/>
632
  </class>
633
634
  <!-- CodeReviewComment -->
635
8590.1.4 by Tim Penhey
Tests pass\!
636
  <class class="lp.code.model.codereviewcomment.CodeReviewComment">
8225.3.2 by Tim Penhey
Sort the imports.
637
    <allow interface="lp.code.interfaces.codereviewcomment.ICodeReviewComment"/>
638
    <allow interface="lp.code.interfaces.branchtarget.IHasBranchTarget"/>
639
  </class>
640
  <subscriber
641
      for="lp.code.interfaces.codereviewcomment.ICodeReviewComment
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
642
           lp.code.interfaces.event.INewCodeReviewCommentEvent"
8377.6.10 by Tim Penhey
Move the code mailout classes.
643
      handler="lp.code.mail.codereviewcomment.send"/>
8225.3.2 by Tim Penhey
Sort the imports.
644
  <subscriber
645
      for="lp.code.interfaces.codereviewcomment.ICodeReviewComment
10517.1.1 by Tim Penhey
Move the code event interfaces into lp.code.interfaces.event.
646
           lp.code.interfaces.event.INewCodeReviewCommentEvent"
8225.3.2 by Tim Penhey
Sort the imports.
647
      handler="canonical.launchpad.subscribers.karma.code_review_comment_added"/>
648
  <adapter
649
      for="lp.code.interfaces.codereviewcomment.ICodeReviewComment"
650
      provides="canonical.launchpad.webapp.interfaces.IPrimaryContext"
651
      factory="lp.code.browser.codereviewcomment.CodeReviewCommentPrimaryContext"/>
652
653
  <!-- hierarchy -->
654
655
  <class class="lp.code.model.branchjob.BranchJob">
656
    <allow interface="lp.code.interfaces.branchjob.IBranchJob"/>
657
  </class>
658
  <class class="lp.code.model.branchjob.RevisionMailJob">
659
    <allow interface="lp.code.interfaces.branchjob.IRevisionMailJob"/>
660
    <allow interface="lp.code.interfaces.branchjob.IBranchJob"/>
661
  </class>
662
  <class class="lp.code.model.branchjob.RevisionsAddedJob">
663
    <allow interface="lp.code.interfaces.branchjob.IRevisionsAddedJob"/>
664
    <allow interface="lp.code.interfaces.branchjob.IBranchJob"/>
665
  </class>
666
  <class class="lp.code.model.branchjob.RosettaUploadJob">
667
    <allow interface="lp.code.interfaces.branchjob.IRosettaUploadJob"/>
668
    <allow interface="lp.code.interfaces.branchjob.IBranchJob"/>
669
  </class>
7675.202.9 by Michael Hudson
lots of typing and a silly test
670
  <class class="lp.code.model.branchjob.ReclaimBranchSpaceJob">
671
    <allow interface="lp.code.interfaces.branchjob.IReclaimBranchSpaceJob"/>
672
    <allow interface="lp.code.interfaces.branchjob.IBranchJob"/>
673
  </class>
8225.3.2 by Tim Penhey
Sort the imports.
674
  <securedutility
675
      component="lp.code.model.branchjob.RevisionMailJob"
676
      provides="lp.code.interfaces.branchjob.IRevisionMailJobSource">
677
    <allow interface="lp.code.interfaces.branchjob.IRevisionMailJobSource"/>
678
  </securedutility>
679
  <securedutility
680
      component="lp.code.model.branchjob.RevisionsAddedJob"
681
      provides="lp.code.interfaces.branchjob.IRevisionsAddedJobSource">
682
    <allow interface="lp.code.interfaces.branchjob.IRevisionsAddedJobSource"/>
683
  </securedutility>
684
  <securedutility
685
      component="lp.code.model.branchjob.RosettaUploadJob"
686
      provides="lp.code.interfaces.branchjob.IRosettaUploadJobSource">
687
    <allow interface="lp.code.interfaces.branchjob.IRosettaUploadJobSource"/>
688
  </securedutility>
7675.202.9 by Michael Hudson
lots of typing and a silly test
689
  <securedutility
690
      component="lp.code.model.branchjob.ReclaimBranchSpaceJob"
691
      provides="lp.code.interfaces.branchjob.IReclaimBranchSpaceJobSource">
692
    <allow interface="lp.code.interfaces.branchjob.IReclaimBranchSpaceJobSource"/>
693
  </securedutility>
8225.3.2 by Tim Penhey
Sort the imports.
694
695
  <!-- CodeImport -->
696
8377.9.14 by Michael Hudson
test passes now
697
  <class class="lp.code.model.codeimport.CodeImport">
8225.3.2 by Tim Penhey
Sort the imports.
698
    <implements interface="lp.code.interfaces.codeimport.ICodeImport"/>
8377.9.14 by Michael Hudson
test passes now
699
    <allow attributes="id
700
                       date_created
701
                       branch
702
                       registrant
703
                       owner
704
                       assignee
705
                       product
706
                       series
707
                       review_status
708
                       rcs_type
709
                       cvs_root
710
                       cvs_module
10129.6.6 by Tim Penhey
More updates.
711
                       url
8377.9.14 by Michael Hudson
test passes now
712
                       date_last_successful
713
                       source_product_series
714
                       update_interval
715
                       effective_update_interval
716
                       import_job
717
                       results
718
                       consecutive_failure_count
719
                       getImportDetailsForDisplay"/>
720
    <require
721
       permission="launchpad.AnyPerson"
10454.12.1 by James Westby
Add ICodeImport and associated tests.
722
       attributes="tryFailingImportAgain
723
                   requestImport"/>
8377.9.14 by Michael Hudson
test passes now
724
    <require
725
       permission="launchpad.Edit"
726
       attributes="updateFromData"/>
8225.3.2 by Tim Penhey
Sort the imports.
727
728
    <!-- ICodeImport has no set_schema, because all modifications should be
729
         done through methods that create CodeImportEvent objects when
730
         appropriate. -->
731
732
  </class>
733
  <adapter
9209.4.5 by Guilherme Salgado
Update all existing breadcrumb adapters to use Breadcrumb rather than BreadcrumbBuilder. Also rename them all
734
      provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
8225.3.2 by Tim Penhey
Sort the imports.
735
      for="lp.code.interfaces.codeimport.ICodeImportSet"
9209.4.5 by Guilherme Salgado
Update all existing breadcrumb adapters to use Breadcrumb rather than BreadcrumbBuilder. Also rename them all
736
      factory="lp.code.browser.codeimport.CodeImportSetBreadcrumb"
8225.3.2 by Tim Penhey
Sort the imports.
737
      permission="zope.Public"/>
738
  <subscriber
739
      for="lp.code.interfaces.codeimport.ICodeImport
740
           lazr.lifecycle.interfaces.IObjectCreatedEvent"
8377.6.10 by Tim Penhey
Move the code mailout classes.
741
      handler="lp.code.mail.codeimport.new_import"/>
8225.3.2 by Tim Penhey
Sort the imports.
742
743
  <!-- CodeImportSet -->
744
745
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
746
      class="lp.code.model.codeimport.CodeImportSet"
8225.3.2 by Tim Penhey
Sort the imports.
747
      provides="lp.code.interfaces.codeimport.ICodeImportSet">
748
    <allow interface="lp.code.interfaces.codeimport.ICodeImportSet"/>
749
  </securedutility>
750
751
  <!-- CodeImportJob -->
752
8590.1.4 by Tim Penhey
Tests pass\!
753
  <class class="lp.code.model.codeimportjob.CodeImportJob">
8225.3.2 by Tim Penhey
Sort the imports.
754
    <allow interface="lp.code.interfaces.codeimportjob.ICodeImportJob"/>
755
  </class>
756
757
  <!-- CodeImportJobSet -->
758
759
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
760
      class="lp.code.model.codeimportjob.CodeImportJobSet"
8225.3.2 by Tim Penhey
Sort the imports.
761
      provides="lp.code.interfaces.codeimportjob.ICodeImportJobSet">
762
    <require
763
        permission="launchpad.View"
764
        interface="lp.code.interfaces.codeimportjob.ICodeImportJobSet"/>
765
    <allow interface="lp.code.interfaces.codeimportjob.ICodeImportJobSetPublic"/>
766
  </securedutility>
767
768
  <!-- CodeImportJobWorkflow -->
769
770
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
771
      class="lp.code.model.codeimportjob.CodeImportJobWorkflow"
8225.3.2 by Tim Penhey
Sort the imports.
772
      provides="lp.code.interfaces.codeimportjob.ICodeImportJobWorkflow">
773
    <require
774
        permission="launchpad.Edit"
775
        attributes="
776
                    newJob
777
                    deletePendingJob
778
                    updateHeartbeat
779
                    finishJob"/>
780
    <require
781
        permission="launchpad.AnyPerson"
782
        attributes="
783
                    requestJob"/>
784
785
    <!-- XXX MichaelHudson 2008-02-28
786
         bug=196345: startJob is called
787
         by the getJobForMachine XML-RPC method, calls to which are
788
         unauthenticated.    When the above bug is fixed, we can
789
         restrict the permissions for this attribute. -->
790
791
    <allow attributes="
792
                    startJob
793
                    reclaimJob"/>
794
  </securedutility>
795
796
  <!-- CodeImportEvent -->
797
8590.1.4 by Tim Penhey
Tests pass\!
798
  <class class="lp.code.model.codeimportevent.CodeImportEvent">
8225.3.2 by Tim Penhey
Sort the imports.
799
    <allow interface="lp.code.interfaces.codeimportevent.ICodeImportEvent"/>
800
  </class>
801
802
  <!-- CodeImportEventSet -->
803
804
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
805
      class="lp.code.model.codeimportevent.CodeImportEventSet"
8225.3.2 by Tim Penhey
Sort the imports.
806
      provides="lp.code.interfaces.codeimportevent.ICodeImportEventSet">
807
    <allow interface="lp.code.interfaces.codeimportevent.ICodeImportEventSet"/>
808
  </securedutility>
809
810
  <!-- CodeImportEventToken -->
811
8590.1.4 by Tim Penhey
Tests pass\!
812
  <class class="lp.code.model.codeimportevent.CodeImportEventToken">
8225.3.2 by Tim Penhey
Sort the imports.
813
    <allow interface="lp.code.interfaces.codeimportevent.ICodeImportEventToken"/>
814
  </class>
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
815
8590.1.4 by Tim Penhey
Tests pass\!
816
  <class class="lp.code.model.revision.Revision">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
817
    <allow interface="lp.code.interfaces.revision.IRevision"/>
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
818
  </class>
819
8590.1.4 by Tim Penhey
Tests pass\!
820
  <class class="lp.code.model.revision.RevisionAuthor">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
821
    <allow interface="lp.code.interfaces.revision.IRevisionAuthor"/>
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
822
  </class>
823
8590.1.4 by Tim Penhey
Tests pass\!
824
  <class class="lp.code.model.revision.RevisionParent">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
825
    <allow interface="lp.code.interfaces.revision.IRevisionParent" />
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
826
  </class>
827
8590.1.4 by Tim Penhey
Tests pass\!
828
  <class class="lp.code.model.revision.RevisionProperty">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
829
    <allow interface="lp.code.interfaces.revision.IRevisionProperty" />
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
830
  </class>
831
832
  <!-- RevisionSet -->
8590.1.4 by Tim Penhey
Tests pass\!
833
  <class class="lp.code.model.revision.RevisionSet">
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
834
    <allow interface="lp.code.interfaces.revision.IRevisionSet" />
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
835
  </class>
836
837
  <securedutility
8590.1.4 by Tim Penhey
Tests pass\!
838
      class="lp.code.model.revision.RevisionSet"
8590.2.2 by Tim Penhey
Fix the fallout in the zcml and other imports.
839
      provides="lp.code.interfaces.revision.IRevisionSet" >
840
    <allow interface="lp.code.interfaces.revision.IRevisionSet" />
8225.3.1 by Tim Penhey
Move the revision files into lp/code.
841
  </securedutility>
842
10482.1.16 by Tim Penhey
Register the global utilities.
843
844
  <securedutility
9644.2.9 by Paul Hummer
Got the script working successfully
845
      component="lp.code.model.branchjob.BranchUpgradeJob"
846
      provides="lp.code.interfaces.branchjob.IBranchUpgradeJobSource">
847
    <allow interface="lp.code.interfaces.branchjob.IBranchUpgradeJobSource"/>
848
  </securedutility>
849
  <class class="lp.code.model.branchjob.BranchUpgradeJob">
850
    <allow interface="lp.services.job.interfaces.job.IRunnableJob" />
851
  </class>
852
7675.458.3 by Paul Hummer
Added more code that allows the script to run.
853
  <securedutility
854
      component="lp.code.model.branchjob.BranchScanJob"
855
      provides="lp.code.interfaces.branchjob.IBranchScanJobSource">
856
    <allow interface="lp.code.interfaces.branchjob.IBranchScanJobSource"/>
857
  </securedutility>
858
  <class class="lp.code.model.branchjob.BranchScanJob">
859
    <allow interface="lp.services.job.interfaces.job.IRunnableJob" />
13242.1.9 by Aaron Bentley
Move memory limit from scan_branches to BranchScanJob.
860
    <allow interface="lp.code.interfaces.branchjob.IBranchJob" />
7675.458.3 by Paul Hummer
Added more code that allows the script to run.
861
  </class>
862
8275.3.11 by Jonathan Lange
Do it in ZCML.
863
  <!-- Linked branches -->
864
  <adapter factory="lp.code.model.linkedbranch.ProductSeriesLinkedBranch" />
865
  <adapter factory="lp.code.model.linkedbranch.ProductLinkedBranch" />
866
  <adapter factory="lp.code.model.linkedbranch.PackageLinkedBranch" />
8880.1.1 by Jonathan Lange
Adapt DistributionSourcePackage to ICanHasLinkedBranch.
867
  <adapter factory="lp.code.model.linkedbranch.DistributionPackageLinkedBranch" />
8275.3.11 by Jonathan Lange
Do it in ZCML.
868
14388.1.1 by William Grant
Rework help. No longer layer-specific, instead under +help-registry, +help-bugs, etc. References not updated.
869
  <lp:help-folder folder="help" name="+help-code" />
8590.1.1 by Tim Penhey
Move diffs into lp/code
870
871
  <!-- Diffs -->
872
  <class class="lp.code.model.diff.Diff">
873
    <allow interface="lp.code.interfaces.diff.IDiff" />
874
  </class>
11486.5.2 by Aaron Bentley
Refactor incremental diff generation.
875
  <class class="lp.code.model.diff.IncrementalDiff">
876
    <allow interface="lp.code.interfaces.diff.IDiff" />
877
    <allow interface="lp.code.interfaces.diff.IIncrementalDiff" />
878
  </class>
8590.1.1 by Tim Penhey
Move diffs into lp/code
879
  <class class="lp.code.model.diff.PreviewDiff">
10270.3.3 by Aaron Bentley
Ensure preview diffs follow their bmp's viewing rules.
880
    <require
881
        permission="launchpad.View"
882
        interface="lp.code.interfaces.diff.IPreviewDiff"/>
8590.1.1 by Tim Penhey
Move diffs into lp/code
883
  </class>
884
10130.12.21 by Michael Nelson
Copied zcml configuration over.
885
  <!-- SourcePackageRecipe -->
886
887
  <securedutility
888
     component="lp.code.model.sourcepackagerecipe.SourcePackageRecipe"
889
     provides="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeSource">
890
    <allow interface="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeSource"/>
7675.618.41 by Paul Hummer
Got a working edit
891
10130.12.21 by Michael Nelson
Copied zcml configuration over.
892
  </securedutility>
893
894
  <class
895
     class="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuild">
11043.2.1 by Paul Hummer
Changed permissions to launchpad.View
896
    <require permission="launchpad.View" interface="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"/>
7675.539.24 by William Grant
Document obscure security hack.
897
    <!-- This is needed for UploadProcessor to run. The permission isn't
898
         important; launchpad.Edit isn't actually held by anybody. -->
11039.3.18 by Jelmer Vernooij
Fix sprb test.
899
    <require permission="launchpad.Edit" set_attributes="status upload_log date_finished requester" />
10130.12.21 by Michael Nelson
Copied zcml configuration over.
900
  </class>
901
902
  <securedutility
903
     component="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuild"
904
     provides="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuildSource">
905
    <allow interface="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuildSource"/>
906
  </securedutility>
907
12961.1.5 by William Grant
Add ISpecificBuildFarmJobSource, which TTBS/SPRB/BPBS already basically implemented. Register them like ISpecificBuildFarmJob: with the BuildFarmJobType as the name.
908
  <securedutility
909
     component="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuild"
910
     provides="lp.buildmaster.interfaces.buildfarmjob.ISpecificBuildFarmJobSource"
911
     name="RECIPEBRANCHBUILD">
912
    <allow interface="lp.buildmaster.interfaces.buildfarmjob.ISpecificBuildFarmJobSource"/>
913
  </securedutility>
914
10130.12.21 by Michael Nelson
Copied zcml configuration over.
915
  <class
916
     class="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuildJob">
11043.2.1 by Paul Hummer
Changed permissions to launchpad.View
917
    <require permission="launchpad.View" interface="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuildJob"/>
10130.12.21 by Michael Nelson
Copied zcml configuration over.
918
  </class>
919
920
  <securedutility
921
     component="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuildJob"
922
     provides="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuildJobSource">
923
    <allow interface="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuildJobSource"/>
924
  </securedutility>
925
926
  <adapter factory="lp.code.model.recipebuilder.RecipeBuildBehavior"
927
           permission="zope.Public" />
928
10498.3.10 by Aaron Bentley
Delegate base_branch and deb_version_template via a new Interface.
929
  <!-- SourcePackageRecipeData -->
930
  <class
931
     class="lp.code.model.sourcepackagerecipedata.SourcePackageRecipeData">
11476.1.1 by Aaron Bentley
Update security settings.
932
    <require permission="launchpad.View"
10498.3.10 by Aaron Bentley
Delegate base_branch and deb_version_template via a new Interface.
933
    interface="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeData"/>
934
  </class>
10130.12.21 by Michael Nelson
Copied zcml configuration over.
935
  <!-- SourcePackageRecipe -->
936
  <class
937
     class="lp.code.model.sourcepackagerecipe.SourcePackageRecipe">
11043.2.1 by Paul Hummer
Changed permissions to launchpad.View
938
    <require permission="launchpad.View"
11476.1.1 by Aaron Bentley
Update security settings.
939
      interface="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeView
940
                 lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeEditableAttributes
941
                 lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeData"
11043.2.1 by Paul Hummer
Changed permissions to launchpad.View
942
      />
10130.12.21 by Michael Nelson
Copied zcml configuration over.
943
    <require
944
       permission="launchpad.Edit"
11476.1.1 by Aaron Bentley
Update security settings.
945
       interface="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeEdit"
946
       set_schema="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipeEditableAttributes"
12261.2.5 by Tim Penhey
Don't expose the mutator method as a property write access.
947
       set_attributes="builder_recipe date_last_modified"
11476.1.1 by Aaron Bentley
Update security settings.
948
        />
10130.12.21 by Michael Nelson
Copied zcml configuration over.
949
  </class>
950
  <class
951
     class="bzrlib.plugins.builder.recipe.BaseRecipeBranch">
952
    <allow attributes="name url revspec revid child_branches deb_version __str__" />
953
  </class>
954
  <class
955
     class="bzrlib.plugins.builder.recipe.RecipeBranch">
956
    <allow attributes="name url revspec revid child_branches __str__" />
957
  </class>
958
  <class
959
     class="bzrlib.plugins.builder.recipe.MergeInstruction">
960
    <allow attributes="as_tuple recipe_branch nest_path" />
961
  </class>
962
  <class
963
     class="bzrlib.plugins.builder.recipe.NestInstruction">
964
    <allow attributes="as_tuple recipe_branch nest_path" />
965
  </class>
966
12607.5.1 by Ian Booth
Ensure date_last_modified is updated
967
  <subscriber
968
    for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe zope.lifecycleevent.interfaces.IObjectModifiedEvent"
969
    handler="lp.code.model.sourcepackagerecipe.recipe_modified"/>
970
10130.12.21 by Michael Nelson
Copied zcml configuration over.
971
  <utility component="lp.code.model.sourcepackagerecipebuild.SourcePackageRecipeBuildJob"
972
        name="RECIPEBRANCHBUILD"
973
        provides="lp.buildmaster.interfaces.buildfarmjob.IBuildFarmJob"/>
11369.1.1 by Guilherme Salgado
Use named adapters for archive upload policies rather than implementing our own global registry of policies.
974
8590.2.5 by Tim Penhey
Add a webservice interface file to make the registration work.
975
  <webservice:register module="lp.code.interfaces.webservice" />
11887.1.2 by Ian Booth
Initial coding
976
12547.1.2 by Ian Booth
Add inline distro series editing - first cut
977
  <adapter
978
    factory="lp.code.browser.sourcepackagerecipe.distroseries_renderer"
979
    name="distroseries"/>
980
11887.1.5 by Ian Booth
Next round
981
  <!-- RecipeBuildRecordSet and related classes-->
11887.1.2 by Ian Booth
Initial coding
982
983
  <securedutility
984
      class="lp.code.model.recipebuild.RecipeBuildRecordSet"
985
      provides="lp.code.interfaces.recipebuild.IRecipeBuildRecordSet">
986
    <allow interface="lp.code.interfaces.recipebuild.IRecipeBuildRecordSet"/>
987
  </securedutility>
988
989
  <class class="lp.code.model.recipebuild.RecipeBuildRecord">
12060.5.1 by Ian Booth
Initial coding
990
    <allow attributes="sourcepackagename recipeowner recipe archive
12510.3.1 by Ian Booth
More performance enhancements
991
                        most_recent_build_time distro_source_package
992
                        recipe_name recipe_url"/>
11887.1.2 by Ian Booth
Initial coding
993
  </class>
994
995
  <class class="lp.code.model.recipebuild.RecipeBuildRecordResultSet">
11887.1.4 by Ian Booth
More coding
996
    <allow interface="storm.zope.interfaces.IResultSet" />
997
    <allow attributes="__getslice__" />
11887.1.2 by Ian Booth
Initial coding
998
  </class>
999
8138.1.6 by Jonathan Lange
Move BranchBadges to branchlisting to avoid circular import.
1000
</configure>