~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
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
<!-- Copyright 2009-2011 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">

  <authorizations module=".security" />

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

  <publisher
      name="bugs"
      factory="lp.bugs.publisher.bugs_request_publication_factory"/>
  <utility
      component="lp.bugs.publisher.BugsLayer"
      provides="zope.publisher.interfaces.browser.IDefaultBrowserLayer"
      name="bugs" />

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

    <class
        class="lp.bugs.model.bugactivity.BugActivity">
        <allow
            interface="lp.bugs.interfaces.bugactivity.IBugActivity"/>
    </class>
    <securedutility
        class="lp.bugs.model.bugactivity.BugActivitySet"
        provides="lp.bugs.interfaces.bugactivity.IBugActivitySet">
        <allow
            interface="lp.bugs.interfaces.bugactivity.IBugActivitySet"/>
    </securedutility>

    <!-- Macros -->

        <class
            class="lp.bugs.browser.bugcomment.BugComment">
            <allow
                interface="lp.bugs.interfaces.bugmessage.IBugComment"/>
        </class>
    <subscriber
        for="lp.bugs.interfaces.cve.ICve                 zope.lifecycleevent.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.cve.cve_modified"/>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugcreation.at_least_one_task"/>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.bug_created"/>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.karma.bug_modified"/>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugattachment.IBugAttachment                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_attachment_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugattachment.IBugAttachment                 lazr.lifecycle.interfaces.IObjectDeletedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_attachment_removed"/>
    <subscriber
        for="lp.bugs.interfaces.bugattachment.IBugAttachment                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugattachment.IBugAttachment                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugbranch.IBugBranch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugbranch.IBugBranch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugcve.IBugCve                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugcve.IBugCve                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.cve_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugmessage.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_comment_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugmessage.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.bug_comment_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugmessage.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugwatch.IBugWatch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.bugwatch_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugwatch.IBugWatch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugwatch.IBugWatch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugactivity.notify_bug_watch_modified"/>
    <subscriber
        for="lp.bugs.interfaces.bugwatch.IBugWatch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugsubscription.IBugSubscription                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_subscription_added"/>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_modified"/>
    <securedutility
        class="lp.systemhomes.MaloneApplication"
        provides="lp.bugs.interfaces.malone.IMaloneApplication">
        <allow
            interface="lp.bugs.interfaces.malone.IMaloneApplication"/>
    </securedutility>

    <!-- pages for the malone application -->

    <xmlrpc:view
        for="lp.bugs.interfaces.malone.IMaloneApplication"
        methods="filebug"
        class="lp.bugs.xmlrpc.bug.FileBugAPI"
        permission="launchpad.AnyPerson"/>

    <!-- Global Malone portlets -->


    <!-- Preserve the /bugs/assigned link to prevent linkrot. This will now
                                 redirect into the FOAF +assignedbugs. -->


    <!-- BugTrackerPerson -->

    <class
        class="lp.bugs.model.bugtrackerperson.BugTrackerPerson">
        <allow
            interface="lp.bugs.interfaces.bugtrackerperson.IBugTrackerPerson"/>
    </class>

    <!-- CveReference -->

    <class
        class="lp.bugs.model.cvereference.CveReference">
        <allow
            interface="lp.bugs.interfaces.cvereference.ICveReference"/>
        <require
            permission="launchpad.AnyPerson"
            set_schema="lp.bugs.interfaces.cvereference.ICveReference"/>
    </class>

      <class class="lp.bugs.interfaces.bugtaskfilter.OrderedBugTask">
        <allow attributes="rank id task"/>
      </class>

        <!-- IBugTask -->

        <class
            class="lp.bugs.model.bugtask.BugTask">
            <allow
                attributes="
                    id
                    assigneeID
                    bug
                    bugID
                    target
                    date_assigned
                    datecreated
                    date_confirmed
                    date_incomplete
                    date_inprogress
                    date_left_new
                    date_triaged
                    date_fix_committed
                    date_fix_released
                    date_left_closed
                    date_closed
                    distributionID
                    distroseriesID
                    milestoneID
                    productID
                    productseriesID
                    sourcepackagenameID
                    task_age
                    bug_subscribers
                    is_complete
                    canBeDeleted
                    canTransitionToStatus
                    isSubscribed
                    getPackageComponent
                    maybeConfirm
                    userHasDriverPrivileges
                    userHasBugSupervisorPrivileges
                    userCanSetAnyAssignee
                    userCanUnassign"/>
            <require
                permission="launchpad.View"
                attributes="
                    bugtargetname
                    bugtargetdisplayname
                    product
                    productseries
                    sourcepackagename
                    distribution
                    distroseries
                    milestone
                    _status
                    status
                    importance
                    assignee
                    bugwatch
                    age
                    owner
                    targetname
                    title
                    related_tasks
                    other_affected_pillars
                    asEmailHeaderValue
                    getDelta
                    pillar
                    target_uses_malone
                    bugtask_branches
                    conjoined_master
                    conjoined_slave
                    subscribe
                    getConjoinedMaster
                    findSimilarBugs
                    getContributorInfo"/>
            <require
                permission="launchpad.Delete"
                interface="lp.bugs.interfaces.bugtask.IBugTaskDelete"/>
            <require
                permission="launchpad.Edit"
                attributes="
                    setStatusFromDebbugs
                    setImportanceFromDebbugs
                    updateTargetNameCache
                    transitionToImportance
                    transitionToStatus
                    transitionToAssignee
                    transitionToMilestone
                    transitionToTarget
                    validateTransitionToTarget
                    "/>

            <!-- XXX Brad Bollenbach 2006-09-29 bug=63000:
                 The permission checking for milestone and importance
                 is further restricted in the browser view code
                 (BugTaskEditView).
            -->
            <require
                permission="launchpad.Edit"
                set_attributes="
                    age
                    bugwatch
                    datecreated
                    importance
                    milestone
                    owner
                    related_tasks
                    setImportanceFromDebbugs
                    setStatusFromDebbugs
                    statusdisplayhtml
                    statuselsewhere
                    targetname
                    title
                    "/>
        </class>
        <adapter
            provides="lp.services.privacy.interfaces.IObjectPrivacy"
            for="lp.bugs.interfaces.bugtask.IBugTask"
            factory="lp.bugs.browser.bugtask.BugTaskPrivacyAdapter"
            permission="zope.Public"/>
        <adapter
            for="lp.bugs.interfaces.bugtask.IBugTask"
            provides="lp.app.interfaces.launchpad.IPrivacy"
            factory="lp.bugs.adapters.bug.bugtask_to_privacy"/>
        <adapter
            for="lp.bugs.interfaces.bugtask.IBugTask"
            provides="lp.bugs.interfaces.bug.IBug"
            factory="lp.bugs.model.bugtask.BugTaskToBugAdapter"/>
        <adapter
            factory="lp.bugs.browser.bugtask.bugtarget_renderer"
            name="target"/>
        <adapter
            provides="lp.services.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugtask.IBugTask"
            factory="lp.bugs.browser.bugtask.BugTaskBreadcrumb"
            permission="zope.Public"/>
        <adapter
            provides="lp.services.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugmessage.IBugComment"
            factory="lp.bugs.browser.bugcomment.BugCommentBreadcrumb"
            permission="zope.Public"/>

        <!-- BugTaskSearchParams -->
        <class
            class="lp.bugs.interfaces.bugtask.BugTaskSearchParams">
            <allow
                attributes="
                    setTarget
                    "/>
            <require
                permission="zope.Public"
                set_attributes="
                    resolved_upstream
                    "/>
        </class>

        <!-- BugTaskSet -->

        <class
            class="lp.bugs.model.bugtask.BugTaskSet">
            <allow
                interface="lp.bugs.interfaces.bugtask.IBugTaskSet"/>
            <allow
                interface="zope.app.form.browser.interfaces.IAddFormCustomization"/>
        </class>
        <securedutility
            provides="lp.bugs.interfaces.bugtask.IBugTaskSet"
            class="lp.bugs.model.bugtask.BugTaskSet">
            <allow
                interface="lp.bugs.interfaces.bugtask.IBugTaskSet"/>
        </securedutility>

        <!-- BugTaskDelta -->

        <class
            class="lp.bugs.model.bugtask.BugTaskDelta">
            <allow
                interface="lp.bugs.interfaces.bugtask.IBugTaskDelta"/>
        </class>
    <class
        class="lp.bugs.model.bugattachment.BugAttachment">
        <require
            permission="launchpad.View"
            interface="lp.bugs.interfaces.bugattachment.IBugAttachment"/>
        <require
            permission="launchpad.Edit"
            set_schema="lp.bugs.interfaces.bugattachment.IBugAttachment"/>
    </class>

    <!-- BugAttachmentSet -->

    <class
        class="lp.bugs.model.bugattachment.BugAttachmentSet">
        <allow
            interface="lp.bugs.interfaces.bugattachment.IBugAttachmentSet"/>
    </class>
    <securedutility
        class="lp.bugs.model.bugattachment.BugAttachmentSet"
        provides="lp.bugs.interfaces.bugattachment.IBugAttachmentSet">
        <allow
            interface="lp.bugs.interfaces.bugattachment.IBugAttachmentSet"/>
    </securedutility>

        <!-- BugTracker -->

        <class
            class="lp.bugs.model.bugtracker.BugTracker">
            <implements
                interface="lp.bugs.interfaces.bugtracker.IBugTracker"/>
            <require
                permission="zope.Public"
                attributes="
                    active
                    aliases
                    baseurl
                    bugtrackertype
                    componentForDistroSourcePackage
                    contactdetails
                    getAllRemoteComponentGroups
                    getBugFilingAndSearchLinks
                    getBugsWatching
                    getLinkedPersonByName
                    getRemoteComponentForDistroSourcePackageName
                    getRemoteComponentGroup
                    has_lp_plugin
                    id
                    imported_bug_messages
                    latestwatches
                    multi_product
                    name
                    owner
                    products
                    projects
                    summary
                    title
                    watches
                    watches_needing_update
                    watches_ready_to_check
                    watches_with_unpushed_comments
                    "/>
            <require
                permission="launchpad.Edit"
                attributes="
                    addRemoteComponentGroup
                    destroySelf
                    ensurePersonForSelf
                    linkPersonToSelf
                    "
                set_attributes="
                    aliases
                    baseurl
                    bugtrackertype
                    contactdetails
                    has_lp_plugin
                    name
                    owner
                    summary
                    title
                    "/>
            <require
                permission="launchpad.Admin"
                attributes="resetWatches"
                set_attributes="active"/>
        </class>
        <adapter
            provides="lp.services.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugtracker.IBugTracker"
            factory="lp.services.webapp.breadcrumb.TitleBreadcrumb"
            permission="zope.Public"/>

        <!-- BugTrackerSet -->

        <class
            class="lp.bugs.model.bugtracker.BugTrackerSet">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/>
        </class>
        <securedutility
            class="lp.bugs.model.bugtracker.BugTrackerSet"
            provides="lp.bugs.interfaces.bugtracker.IBugTrackerSet">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerSet"/>
        </securedutility>
        <adapter
            provides="lp.services.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugtracker.IBugTrackerSet"
            factory="lp.bugs.browser.bugtracker.BugTrackerSetBreadcrumb"
            permission="zope.Public"/>

        <!-- BugTrackerAlias -->

        <class
            class="lp.bugs.model.bugtracker.BugTrackerAlias">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerAlias"/>
            <require
                permission="zope.Public"
                set_schema="lp.bugs.interfaces.bugtracker.IBugTrackerAlias"/>
        </class>

        <!-- BugTrackerAliasSet -->

        <class
            class="lp.bugs.model.bugtracker.BugTrackerAliasSet">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerAliasSet"/>
        </class>
        <securedutility
            class="lp.bugs.model.bugtracker.BugTrackerAliasSet"
            provides="lp.bugs.interfaces.bugtracker.IBugTrackerAliasSet">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerAliasSet"/>
        </securedutility>

        <!--BugTrackerComponent -->

        <class
            class="lp.bugs.model.bugtracker.BugTrackerComponent">
            <require
                permission="zope.Public"
                attributes="
                    id
                    name
                    is_visible
                    is_custom
                    distro_source_package
                    component_group
                    "/>
            <require
                permission="launchpad.AnyPerson"
                set_attributes="
                    is_visible
                    is_custom
                    distro_source_package
                    "/>
            <implements
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerComponent"/>
        </class>

        <!--BugTrackerComponentGroup -->

        <class
            class="lp.bugs.model.bugtracker.BugTrackerComponentGroup">
            <require
                permission="zope.Public"
                attributes="
                    id
                    name
                    bug_tracker
                    components
                    getComponent
                    addComponent
                    addCustomComponent
                    "/>
            <implements
                interface="lp.bugs.interfaces.bugtracker.IBugTrackerComponentGroup"/>
        </class>

        <!-- RemoteBug -->

        <class
            class="lp.bugs.browser.bugtracker.RemoteBug">
            <allow
                interface="lp.bugs.interfaces.bugtracker.IRemoteBug"/>
        </class>

    <!-- IBugBranch -->

    <class
        class="lp.bugs.model.bugbranch.BugBranch">
        <allow
            interface="lp.bugs.interfaces.bugbranch.IBugBranch"/>
        <require
            permission="launchpad.Edit"
            attributes="
                destroySelf"/>
    </class>
    <adapter
        for="lp.bugs.interfaces.bugbranch.IBugBranch"
        provides="lp.services.webapp.interfaces.IPrimaryContext"
        factory="lp.bugs.browser.bugbranch.BugBranchPrimaryContext"/>

    <!-- hierarchy -->

    <subscriber
        for="lp.bugs.interfaces.bugbranch.IBugBranch                                                lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.bug_branch_created"/>

    <!-- BugBranchSet -->

    <class
        class="lp.bugs.model.bugbranch.BugBranchSet">
        <allow
            interface="lp.bugs.interfaces.bugbranch.IBugBranchSet"/>
    </class>
    <securedutility
        class="lp.bugs.model.bugbranch.BugBranchSet"
        provides="lp.bugs.interfaces.bugbranch.IBugBranchSet">
        <allow
            interface="lp.bugs.interfaces.bugbranch.IBugBranchSet"/>
    </securedutility>

    <!-- BugCve -->

    <class
        class="lp.bugs.model.cve.BugCve">
        <allow
            interface="lp.bugs.interfaces.bugcve.IBugCve"/>
    </class>

        <!-- CVE -->

        <class
            class="lp.bugs.model.cve.Cve">
            <allow
                interface="lp.bugs.interfaces.cve.ICve"/>
            <require
                permission="launchpad.AnyPerson"
                set_schema="lp.bugs.interfaces.cve.ICve"/>

            <!-- IBugLinkTarget -->

            <allow
                attributes="
                    bug_links"/>
            <require
                permission="launchpad.AnyPerson"
                attributes="
                    linkBug
                    unlinkBug"/>
        </class>

        <!-- CveSet -->

        <class
            class="lp.bugs.model.cve.CveSet">
            <allow
                interface="lp.bugs.interfaces.cve.ICveSet"/>
        </class>
        <securedutility
            class="lp.bugs.model.cve.CveSet"
            provides="lp.bugs.interfaces.cve.ICveSet">
            <allow
                interface="lp.bugs.interfaces.cve.ICveSet"/>
        </securedutility>

    <!-- BugSubscription -->

    <class
        class="lp.bugs.model.bugsubscription.BugSubscription">
        <allow
            interface="lp.bugs.interfaces.bugsubscription.IBugSubscription"/>
        <require
            permission="launchpad.Edit"
            set_attributes="bug_notification_level" />
    </class>

    <!-- BugSubscriptionFilter -->
    <class
        class=".model.bugsubscriptionfilter.BugSubscriptionFilter">
      <allow
          interface=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterAttributes"/>
      <allow
          interface=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterMethodsPublic"/>
      <require
          permission="launchpad.Edit"
          interface=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterMethodsProtected"
          set_schema=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterAttributes" />
    </class>

    <!-- BugMute -->
    <class
        class=".model.bug.BugMute">
      <allow
          interface=".interfaces.bug.IBugMute"/>
    </class>

    <!-- BugSubscriptionFilterMute -->
    <class
        class=".model.bugsubscriptionfilter.BugSubscriptionFilterMute">
      <allow
          interface=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterMute"/>
      <require
          permission="launchpad.Edit"
          set_schema=".interfaces.bugsubscriptionfilter.IBugSubscriptionFilterMute" />
    </class>


    <!-- BugSubscriptionInfo -->

    <class class=".model.bug.BugSubscriptionInfo">
      <!-- Instance variables -->
      <require
          permission="launchpad.View"
          attributes="
              bug
              bugtask
              level
              " />
      <!-- Properties -->
      <require
          permission="launchpad.View"
          attributes="
              all_assignees
              all_pillar_owners_without_bug_supervisors
              also_notified_subscribers
              direct_subscribers
              direct_subscribers_at_all_levels
              direct_subscriptions
              direct_subscriptions_at_all_levels
              duplicate_only_subscriptions
              duplicate_subscriptions
              indirect_subscribers
              muted_subscribers
              structural_subscribers
              structural_subscriptions
              " />
      <!-- Methods -->
      <require
          permission="launchpad.View"
          attributes="
              forLevel
              forTask
              " />
    </class>

    <!-- PersonSubscriptionInfo -->

    <class class="lp.bugs.model.personsubscriptioninfo.RealSubscriptionInfo">
        <allow
            interface="
              lp.bugs.interfaces.personsubscriptioninfo.IRealSubscriptionInfo"/>
    </class>

    <class class="lp.bugs.model.personsubscriptioninfo.VirtualSubscriptionInfo">
        <allow
            interface="
              lp.bugs.interfaces.personsubscriptioninfo.IVirtualSubscriptionInfo"/>
    </class>

    <class class="lp.bugs.model.personsubscriptioninfo.RealSubscriptionInfoCollection">
        <allow
            interface="
              lp.bugs.interfaces.personsubscriptioninfo.IRealSubscriptionInfoCollection"/>
    </class>

    <class class="lp.bugs.model.personsubscriptioninfo.VirtualSubscriptionInfoCollection">
        <allow
            interface="
              lp.bugs.interfaces.personsubscriptioninfo.IVirtualSubscriptionInfoCollection"/>
    </class>

    <class class="lp.bugs.model.personsubscriptioninfo.PersonSubscriptions">
        <allow
            interface="
              lp.bugs.interfaces.personsubscriptioninfo.IPersonSubscriptions"/>
    </class>

        <!-- Bug -->

        <class
            class="lp.bugs.model.bug.Bug">
            <implements
                interface="lp.bugs.interfaces.bug.IBug"/>
            <allow
                attributes="
                    id
                    private
                    access_policy
                    bugtasks
                    default_bugtask
                    affected_pillars
                    permits_expiration
                    can_expire
                    subscriptions
                    syncUpdate
                    date_last_updated
                    getActivityForDateRange
                    getBugTask
                    getDirectSubscribers
                    getDirectSubscribersWithDetails
                    getDirectSubscriptions
                    getIndirectSubscribers
                    is_complete
                    maybeConfirmBugtasks
                    official_tags
                    who_made_private
                    date_made_private
                    userCanView
                    userCanSetCommentVisibility
                    personIsDirectSubscriber
                    personIsAlsoNotifiedSubscriber
                    personIsSubscribedToDuplicate
                    shouldConfirmBugtasks
                    heat
                    heat_last_updated
                    has_patches
                    latest_patch
                    latest_patch_uploaded"/>
            <require
                permission="launchpad.View"
                attributes="
                    datecreated
                    name
                    title
                    description
                    ownerID
                    owner
                    duplicateof
                    communityscore
                    communitytimestamp
                    hits
                    hitstimestamp
                    activityscore
                    activitytimestamp
                    displayname
                    activity
                    initial_message
                    linked_branches
                    getVisibleLinkedBranches
                    watches
                    has_cves
                    cves
                    cve_links
                    duplicates
                    attachments
                    attachments_unpopulated
                    questions
                    specifications
                    followup_subject
                    isSubscribed
                    messages
                    getBugNotificationRecipients
                    hasBranch
                    security_related
                    tags
                    getMessagesForView
                    isSubscribedToDupes
                    getSubscribersFromDuplicates
                    getSubscriptionsFromDuplicates
                    getSubscribersForPerson
                    getSubscriptionForPerson
                    getSubscriptionInfo
                    indexed_messages
                    _indexed_messages
                    getAlsoNotifiedSubscribers
                    getBugWatch
                    canBeNominatedFor
                    getNominationFor
                    getNominations
                    date_last_message
                    number_of_duplicates
                    message_count
                    comment_count
                    getQuestionCreatedFromBug
                    canBeAQuestion
                    getBugTasksByPackageName
                    users_affected_count
                    users_unaffected_count
                    users_affected
                    users_unaffected
                    users_affected_count_with_dupes
                    other_users_affected_count_with_dupes
                    users_affected_with_dupes
                    bug_messages
                    isUserAffected
                    getHWSubmissions
                    isExpirable
                    isMuted
                    "/>
            <require
                permission="launchpad.Edit"
                attributes="
                    addAttachment
                    addChange
                    addCommentNotification
                    addNomination
                    addTask
                    addWatch
                    convertToQuestion
                    expireNotifications
                    findCvesInText
                    linkAttachment
                    linkBranch
                    linkCVE
                    linkCVEAndReturnNothing
                    linkHWSubmission
                    linkMessage
                    markAsDuplicate
                    markUserAffected
                    mute
                    newMessage
                    removeWatch
                    setCommentVisibility
                    setPrivate
                    setSecurityRelated
                    setPrivacyAndSecurityRelated
                    setAccessPolicy
                    setStatus
                    subscribe
                    unlinkBranch
                    unlinkCVE
                    unlinkHWSubmission
                    unmute
                    unsubscribe
                    unsubscribeFromDupes
                    updateHeat"
                set_attributes="
                    activity initial_message
                    activityscore
                    activitytimestamp
                    communityscore
                    communitytimestamp
                    date_last_updated
                    date_made_private
                    datecreated
                    hits
                    hitstimestamp
                    name
                    owner
                    ownerID
                    security_related
                    tags
                    title description
                    who_made_private"/>
            <require
                permission="launchpad.Admin"
                attributes="
                    setHeat"
                set_attributes="heat_last_updated" />
        </class>
        <adapter
            for="lp.bugs.interfaces.bug.IBug"
            provides="lp.services.webapp.interfaces.ILaunchpadContainer"
            factory="lp.bugs.publisher.LaunchpadBugContainer"/>

        <!-- BugSet -->

        <class
            class="lp.bugs.model.bug.BugSet">
            <allow
                interface="lp.bugs.interfaces.bug.IBugSet"/>
        </class>
        <securedutility
            class="lp.bugs.model.bug.BugSet"
            provides="lp.bugs.interfaces.bug.IBugSet">
            <allow
                interface="lp.bugs.interfaces.bug.IBugSet"/>
        </securedutility>

        <!-- BugDelta -->

        <class
            class="lp.bugs.adapters.bugdelta.BugDelta">
            <allow
                interface="lp.bugs.interfaces.bug.IBugDelta"/>
        </class>

    <!-- BugMessage -->

    <class
        class="lp.bugs.model.bugmessage.BugMessage">
        <allow
            interface="lp.bugs.interfaces.bugmessage.IBugMessage"/>
        <require
            permission="launchpad.Admin"
            set_attributes="remote_comment_id bugwatch index"/>
    </class>

    <!-- BugMessageSet -->

    <class
        class="lp.bugs.model.bugmessage.BugMessageSet">
        <allow
            interface="lp.bugs.interfaces.bugmessage.IBugMessageSet"/>
    </class>
    <securedutility
        class="lp.bugs.model.bugmessage.BugMessageSet"
        provides="lp.bugs.interfaces.bugmessage.IBugMessageSet">
        <allow
            interface="lp.bugs.interfaces.bugmessage.IBugMessageSet"/>
    </securedutility>
    <adapter
        for="lp.bugs.interfaces.bugnomination.IBugNomination"
        provides="lp.services.webapp.interfaces.IPrimaryContext"
        factory="lp.bugs.browser.bugnomination.BugNominationPrimaryContext"/>
        <class
            class="lp.bugs.model.bugnomination.BugNomination">
            <require
                permission="launchpad.View"
                attributes="
                    id
                    date_created
                    date_decided
                    distroseries
                    productseries
                    bug
                    owner
                    ownerID
                    decider
                    target
                    status
                    isApproved
                    isDeclined
                    isProposed
                    canApprove"/>
            <require
                permission="launchpad.Driver"
                attributes="
                    approve
                    decline"/>
            <require
                permission="launchpad.Edit"
                attributes="
                    destroySelf"/>
        </class>
        <securedutility
            class="lp.bugs.model.bugnomination.BugNominationSet"
            provides="lp.bugs.interfaces.bugnomination.IBugNominationSet">
            <allow
                interface="lp.bugs.interfaces.bugnomination.IBugNominationSet"/>
        </securedutility>
    <subscriber
        for="lp.bugs.interfaces.bug.IBug                            zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bug_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugcve.IBugCve                            lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_cve_linked_to_bug"/>
    <subscriber
        for="lp.bugs.interfaces.bugcve.IBugCve                            lazr.lifecycle.interfaces.IObjectDeletedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_cve_unlinked_from_bug"/>
    <subscriber
        for="lp.bugs.interfaces.bugsubscription.IBugSubscription                     zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bugsubscription_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugsubscription.IBugSubscription                     lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bugsubscription_edited"/>

        <!-- BugWatch -->

        <class
            class="lp.bugs.model.bugwatch.BugWatch">
            <implements
                interface="lp.bugs.interfaces.bugwatch.IBugWatch"/>
            <require
                permission="zope.Public"
                attributes="
                    activity
                    bug
                    bugtasks
                    bugtracker
                    can_be_rescheduled
                    datecreated
                    failed_activity
                    hasComment
                    unpushed_comments
                    id
                    last_error_type
                    lastchanged
                    lastchecked
                    needscheck
                    next_check
                    owner
                    remote_importance
                    remotebug
                    remotestatus
                    title
                    url
                    getImportedBugMessages"/>
            <require
                permission="launchpad.AnyPerson"
                attributes="
                    destroySelf
                    addActivity
                    setNextCheck"
                set_attributes="bugtracker remotebug"/>
            <require
                permission="launchpad.Admin"
                attributes="
                    addComment
                    updateImportance
                    updateStatus
                    reset
                    "
                set_attributes="
                    last_error_type
                    lastchanged
                    lastchecked
                    needscheck
                    next_check
                    remote_importance
                    remotestatus
                    "/>
        </class>

        <!-- https://launchpad.net/bugs/98639 -->


        <!--BugWatchSet -->

        <class
            class="lp.bugs.model.bugwatch.BugWatchSet">
            <allow
                interface="lp.bugs.interfaces.bugwatch.IBugWatchSet"/>
            <allow
                interface="zope.app.form.browser.interfaces.IAddFormCustomization"/>
        </class>
        <securedutility
            class="lp.bugs.model.bugwatch.BugWatchSet"
            provides="lp.bugs.interfaces.bugwatch.IBugWatchSet">
            <allow
                interface="lp.bugs.interfaces.bugwatch.IBugWatchSet"/>
        </securedutility>

        <!-- BugWatchActivity -->
        <class
            class="lp.bugs.model.bugwatch.BugWatchActivity">
            <allow
                interface="lp.bugs.interfaces.bugwatch.IBugWatchActivity"/>
        </class>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.notify_bugtask_added"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 lazr.lifecycle.interfaces.IObjectDeletedEvent"
        handler="lp.bugs.subscribers.bugactivity.notify_bugtask_deleted"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.karma.bugtask_created"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugtask.notify_bugtask_edited"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.karma.bugtask_modified"/>
    <subscriber
        for="lp.bugs.interfaces.bugtask.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <class
        class="lp.bugs.model.bugnotification.BugNotification">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotification"/>
        <require
            permission="launchpad.AnyPerson"
            set_schema="lp.bugs.interfaces.bugnotification.IBugNotification"/>
	<require
	    permission="launchpad.Edit"
            attributes="destroySelf" />
    </class>
    <class
        class="lp.bugs.model.bugnotification.BugNotificationRecipient">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotificationRecipient"/>
    </class>
    <class
        class="lp.bugs.mail.bugnotificationrecipients.BugNotificationRecipients">
        <allow
            interface="lp.services.mail.interfaces.INotificationRecipientSet"/>
        <!-- BugNotificationRecipients provides the following
             attributes/methods in addition. -->
        <allow
            attributes="subscription_filters addFilter addBugSupervisor addMaintainer"/>
    </class>
    <securedutility
        provides="lp.bugs.interfaces.bugnotification.IBugNotificationSet"
        class="lp.bugs.model.bugnotification.BugNotificationSet">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotificationSet"/>
    </securedutility>
    <adapter
        name="bugs"
        provides="lp.services.webapp.interfaces.IBreadcrumb"
        for="lp.bugs.interfaces.bugtarget.IBugTarget"
        factory="lp.bugs.browser.bugtarget.BugsVHostBreadcrumb"
        permission="zope.Public"/>
    <adapter
        name="bugs"
        provides="lp.services.webapp.interfaces.IBreadcrumb"
        for="lp.registry.interfaces.projectgroup.IProjectGroup"
        factory="lp.bugs.browser.bugtarget.BugsVHostBreadcrumb"
        permission="zope.Public"/>

    <!-- ProcessApportBlobJobs -->
    <class class="lp.bugs.model.apportjob.ProcessApportBlobJob">
        <allow interface="lp.bugs.interfaces.apportjob.IApportJob" />
        <allow interface="lp.bugs.interfaces.apportjob.IProcessApportBlobJob"/>
    </class>
    <securedutility
        component="lp.bugs.model.apportjob.ProcessApportBlobJob"
        provides="lp.bugs.interfaces.apportjob.IProcessApportBlobJobSource">
        <allow
            interface="lp.bugs.interfaces.apportjob.IProcessApportBlobJobSource"/>
    </securedutility>

    <!-- FileBugData -->
    <class class="lp.bugs.model.bug.FileBugData">
        <allow interface="lp.bugs.interfaces.bug.IFileBugData" />
    </class>

    <!-- StructuralSubscription -->

    <class
        class="lp.bugs.model.structuralsubscription.StructuralSubscription">
        <allow
            interface=".interfaces.structuralsubscription.IStructuralSubscriptionPublic" />
        <require
            set_schema=".interfaces.structuralsubscription.IStructuralSubscriptionPublic"
            permission="zope.Public" />
        <require
            interface=".interfaces.structuralsubscription.IStructuralSubscriptionRestricted"
            permission="launchpad.Edit" />
    </class>
    <adapter
        factory=".model.structuralsubscription.DistroSeriesTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.ProjectGroupTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.DistributionSourcePackageTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.MilestoneTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.ProductTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.ProductSeriesTargetHelper"
        permission="zope.Public"/>
    <adapter
        factory=".model.structuralsubscription.DistributionTargetHelper"
        permission="zope.Public"/>

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

  <securedutility
    name="UsesBugsDistribution"
    component="lp.bugs.vocabularies.UsesBugsDistributionVocabulary"
    provides="zope.schema.interfaces.IVocabularyFactory"
    >
    <allow interface="zope.schema.interfaces.IVocabularyFactory"/>
  </securedutility>
</configure>