~launchpad-pqm/launchpad/devel

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
<!-- Copyright 2009-2010 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:browser="http://namespaces.zope.org/browser"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:webservice="http://namespaces.canonical.com/webservice"
    xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
    xmlns:lp="http://namespaces.canonical.com/lp"
    i18n_domain="launchpad">

  <include package=".browser"/>
  <include package=".vocabularies"/>

  <publisher
      name="blueprints"
      factory="lp.blueprints.publisher.blueprints_request_publication_factory"/>
  <utility
      component="lp.blueprints.publisher.BlueprintsLayer"
      provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
      name="blueprints" />


  <lp:help-folder folder="help" name="+help-blueprints" />

  <!-- Sprint -->

  <class
      class="lp.blueprints.model.sprint.Sprint">
    <allow
        interface="lp.blueprints.interfaces.sprint.ISprint"/>
    <require
        permission="launchpad.AnyPerson"
        set_schema="lp.blueprints.interfaces.sprint.ISprint"/>
  </class>
  <adapter
      provides="lp.services.webapp.interfaces.IBreadcrumb"
      for="lp.blueprints.interfaces.sprint.ISprint"
      factory="lp.services.webapp.breadcrumb.TitleBreadcrumb"
      permission="zope.Public"/>
  <adapter
      provides="lp.services.webapp.interfaces.IBreadcrumb"
      for="lp.blueprints.interfaces.sprint.ISprintSet"
      factory="lp.blueprints.browser.sprint.SprintSetBreadcrumb"
      permission="zope.Public"/>
  <adapter
      provides="lp.services.webapp.interfaces.IBreadcrumb"
      for="lp.blueprints.interfaces.specification.ISpecification"
      factory="lp.services.webapp.breadcrumb.TitleBreadcrumb"
      permission="zope.Public"/>

  <!-- This is a view used to export data needed by the sprint scheduler.
       As there are no API stability guarantees, the view name starts
       with "temp" to discourage people from relying on it. -->

  <!-- SprintSet -->

  <class
      class="lp.blueprints.model.sprint.SprintSet">
    <allow interface="lp.blueprints.interfaces.sprint.ISprintSet"/>
  </class>
  <securedutility
      class="lp.blueprints.model.sprint.SprintSet"
      provides="lp.blueprints.interfaces.sprint.ISprintSet">
    <allow interface="lp.blueprints.interfaces.sprint.ISprintSet"/>
  </securedutility>

  <!-- SprintSpecification -->

  <class
      class="lp.blueprints.model.sprintspecification.SprintSpecification">
    <allow
        interface="lp.blueprints.interfaces.sprintspecification.ISprintSpecification"/>
    <require
        permission="launchpad.Edit"
        set_attributes="whiteboard"/>
  </class>

  <!-- SpecificationDependency -->

  <class class="lp.blueprints.model.specificationdependency.SpecificationDependency">
    <allow interface="lp.blueprints.interfaces.specificationdependency.ISpecificationDependency"/>
    <require
        permission="zope.Public"
        set_schema="lp.blueprints.interfaces.specificationdependency.ISpecificationDependency"/>
  </class>
  <adapter
      for="lp.blueprints.interfaces.specificationdependency.ISpecificationDependency"
      factory="lp.blueprints.interfaces.specificationdependency.SpecDependencyIsAlsoRemoval"
      provides="lp.blueprints.interfaces.specificationdependency.ISpecificationDependencyRemoval"/>

  <!-- SpecificationSubscription -->

  <class class="lp.blueprints.model.specificationsubscription.SpecificationSubscription">
    <allow
        interface="lp.blueprints.interfaces.specificationsubscription.ISpecificationSubscription"/>
    <require
        permission="launchpad.Edit"
        set_attributes="essential"/>
  </class>
  <subscriber
      for="lp.blueprints.interfaces.specificationsubscription.ISpecificationSubscription
           lazr.lifecycle.interfaces.IObjectCreatedEvent"
      handler="lp.blueprints.mail.notifications.notify_specification_subscription_created"/>
  <subscriber
      for="lp.blueprints.interfaces.specificationsubscription.ISpecificationSubscription
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
      handler="lp.blueprints.mail.notifications.notify_specification_subscription_modified"/>

  <!-- SpecificationFeedback -->

  <class class="lp.blueprints.model.specificationfeedback.SpecificationFeedback">
    <allow interface="lp.blueprints.interfaces.specificationfeedback.ISpecificationFeedback"/>
    <require
        permission="zope.Public"
        set_schema="lp.blueprints.interfaces.specificationfeedback.ISpecificationFeedback"/>
  </class>

  <!-- SprintAttendance -->

  <class class="lp.blueprints.model.sprintattendance.SprintAttendance">
    <allow interface="lp.blueprints.interfaces.sprintattendance.ISprintAttendance"/>
    <require
        permission="launchpad.Edit"
        set_attributes="time_starts time_ends"/>
  </class>

  <!-- ISpecificationBranch -->

  <class class="lp.blueprints.model.specificationbranch.SpecificationBranch">
    <allow interface="lp.blueprints.interfaces.specificationbranch.ISpecificationBranch"/>
    <require
        permission="launchpad.AnyPerson"
        set_attributes="summary"/>
  </class>
  <subscriber
      for="lp.blueprints.interfaces.specificationbranch.ISpecificationBranch
           lazr.lifecycle.interfaces.IObjectCreatedEvent"
      handler="lp.blueprints.subscribers.spec_branch_created"/>

  <!-- SpecificationBranchSet -->

  <securedutility
      class="lp.blueprints.model.specificationbranch.SpecificationBranchSet"
      provides="lp.blueprints.interfaces.specificationbranch.ISpecificationBranchSet">
    <allow interface="lp.blueprints.interfaces.specificationbranch.ISpecificationBranchSet"/>
  </securedutility>

  <!-- Specification -->

  <class class="lp.blueprints.model.specification.Specification">
    <allow interface="lp.blueprints.interfaces.specification.ISpecificationPublic"/>
    <!-- We allow any authenticated person to update the whiteboard -->
    <require
        permission="launchpad.AnyPerson"
        set_attributes="whiteboard"/>
    <!-- NB: goals and goalstatus are not to be set directly, it should
         only be set through the proposeGoal / acceptBy / declineBy
         methods -->
    <require
        permission="launchpad.Edit"
        interface="lp.blueprints.interfaces.specification.ISpecificationEditRestricted"
        set_attributes="name title summary definition_status specurl
                        superseded_by milestone product distribution
                        approver assignee drafter man_days
                        implementation_status"/>
    <require
        permission="launchpad.Admin"
        set_attributes="priority direction_approved"/>
    <allow
        attributes="bugs
                    bug_links"/>
    <require
        permission="launchpad.AnyPerson"
        attributes="linkBug
                    unlinkBug"/>
  </class>

  <class class="lp.blueprints.model.specificationbug.SpecificationBug">
    <allow interface="lp.blueprints.interfaces.specificationbug.ISpecificationBug"/>
    <allow interface="lazr.restful.interfaces.IJSONPublishable"/>
  </class>

  <subscriber
      for="lp.blueprints.interfaces.specification.ISpecification
           lazr.lifecycle.interfaces.IObjectCreatedEvent"
      handler="lp.blueprints.subscribers.spec_created"/>
  <subscriber
      for="lp.blueprints.interfaces.specification.ISpecification
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
      handler="lp.blueprints.subscribers.spec_modified"/>
  <subscriber
      for="lp.blueprints.interfaces.specification.ISpecification
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
      handler="lp.blueprints.subscribers.specification_update_lifecycle_status"/>
  <subscriber
      for="lp.blueprints.interfaces.specification.ISpecification
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
      handler="lp.blueprints.subscribers.specification_goalstatus"/>
  <subscriber
      for="lp.blueprints.interfaces.specification.ISpecification
           lazr.lifecycle.interfaces.IObjectModifiedEvent"
      handler="lp.blueprints.mail.notifications.notify_specification_modified"/>

  <!-- SpecificationSet -->

  <class class="lp.blueprints.model.specification.SpecificationSet">
    <allow interface="lp.blueprints.interfaces.specification.ISpecificationSet"/>
  </class>

  <securedutility
      class="lp.blueprints.model.specification.SpecificationSet"
      provides="lp.blueprints.interfaces.specification.ISpecificationSet">
    <allow interface="lp.blueprints.interfaces.specification.ISpecificationSet"/>
  </securedutility>

  <!-- SpecificationDelta -->

  <class class="lp.blueprints.adapters.SpecificationDelta">
    <allow interface="lp.blueprints.interfaces.specification.ISpecificationDelta"/>
  </class>

  <!-- SpecificationMessage -->

  <class class="lp.blueprints.model.specificationmessage.SpecificationMessage">
    <allow interface="lp.blueprints.interfaces.specificationmessage.ISpecificationMessage"/>
  </class>

  <!-- SpecificationMessageSet -->

  <class class="lp.blueprints.model.specificationmessage.SpecificationMessageSet">
    <allow interface="lp.blueprints.interfaces.specificationmessage.ISpecificationMessageSet"/>
  </class>

  <securedutility
      class="lp.blueprints.model.specificationmessage.SpecificationMessageSet"
      provides="lp.blueprints.interfaces.specificationmessage.ISpecificationMessageSet">
    <allow interface="lp.blueprints.interfaces.specificationmessage.ISpecificationMessageSet"/>
  </securedutility>

  <webservice:register module="lp.blueprints.interfaces.webservice" />

</configure>