~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
<!-- Copyright 2009 Canonical Ltd.  This software is licensed under the
     GNU Affero General Public License version 3 (see the file LICENSE).
-->

<configure
    xmlns="http://namespaces.zope.org/zope"
    xmlns:browser="http://namespaces.zope.org/browser"
    xmlns:i18n="http://namespaces.zope.org/i18n"
    xmlns:xmlrpc="http://namespaces.zope.org/xmlrpc"
    xmlns:lp="http://namespaces.canonical.com/lp"
    i18n_domain="launchpad">
    <include
        package=".browser"/>

    <publisher
       name="bugs"
       factory="lp.bugs.publisher.bugs_request_publication_factory"/>

    <lp:help-folder
        folder="help" type="lp.bugs.publisher.BugsLayer" />

    <class
        class="canonical.launchpad.database.BugActivity">
        <allow
            interface="lp.bugs.interfaces.bugactivity.IBugActivity"/>
    </class>
    <securedutility
        class="canonical.launchpad.database.BugActivitySet"
        provides="lp.bugs.interfaces.bugactivity.IBugActivitySet">
        <allow
            interface="lp.bugs.interfaces.bugactivity.IBugActivitySet"/>
    </securedutility>
    <facet
        facet="bugs"/>

    <!-- Macros -->

    <facet
        facet="bugs">
        <class
            class="lp.bugs.browser.bugcomment.BugComment">
            <allow
                interface="canonical.launchpad.interfaces.IBugComment"/>
        </class>
    </facet>
    <subscriber
        for="canonical.launchpad.interfaces.ICve                 zope.lifecycleevent.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.cve.cve_modified"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugcreation.at_least_one_task"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.subscribers.karma.bug_created"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_modified"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="canonical.launchpad.subscribers.karma.bug_modified"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugAttachment                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_attachment_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugAttachment                 lazr.lifecycle.interfaces.IObjectDeletedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_attachment_removed"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugAttachment                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugAttachment                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugBranch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugBranch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugCve                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugCve                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.subscribers.karma.cve_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_comment_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.subscribers.karma.bug_comment_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugMessage                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugWatch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.subscribers.karma.bugwatch_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugWatch                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugWatch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugactivity.notify_bug_watch_modified"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugWatch                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugSubscription                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.mailnotification.notify_bug_subscription_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bug.notify_bug_modified"/>
    <securedutility
        class="canonical.launchpad.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="canonical.launchpad.xmlrpc.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>
    <class
        class="lp.bugs.model.packagebugsupervisor.PackageBugSupervisor">
        <allow
            attributes="
                id
                distribution
                sourcepackagename
                bug_supervisor"/>
    </class>

    <!-- CveReference -->

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

        <!-- IBugTask -->

        <class
            class="canonical.launchpad.database.BugTask">
            <allow
                attributes="
                    id
                    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
                    task_age
                    bug_subscribers
                    is_complete
                    canTransitionToStatus
                    isMentor
                    canMentor
                    isSubscribed
                    getPackageComponent
                    userCanEditImportance
                    userCanEditMilestone
                    userCanSetAnyAssignee
                    userCanUnassign"/>
            <require
                permission="launchpad.View"
                attributes="
                    bugtargetname
                    bugtargetdisplayname
                    product
                    productseries
                    sourcepackagename
                    distribution
                    distroseries
                    milestone
                    status
                    statusexplanation
                    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"/>
            <require
                permission="launchpad.Edit"
                attributes="
                    setStatusFromDebbugs
                    setImportanceFromDebbugs
                    updateTargetNameCache
                    transitionToImportance
                    transitionToStatus
                    transitionToAssignee
                    transitionToMilestone
                    transitionToTarget"/>

            <!-- 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="product productseries sourcepackagename distribution                                                                                                                 distroseries milestone statusexplanation                                                                                                                 importance bugwatch datecreated                                                                                                                 age owner targetname title related_tasks                                                                                                                 statusdisplayhtml statuselsewhere                                                                                                                 setStatusFromDebbugs setImportanceFromDebbugs"/>
            <require
                permission="launchpad.AnyPerson"
                attributes="
                    offerMentoring
                    retractMentoring"/>
        </class>
        <adapter
            provides="canonical.lazr.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="canonical.launchpad.interfaces.launchpad.IPrivacy"
            factory="lp.bugs.adapters.bug.bugtask_to_privacy"/>
        <adapter
            for="lp.bugs.interfaces.bugtask.IBugTask"
            provides="canonical.launchpad.interfaces.IBug"
            factory="lp.bugs.model.bugtask.BugTaskToBugAdapter"/>
        <adapter
            factory="lp.bugs.browser.bugtask.assignee_renderer"
            name="assignee"/>
        <adapter
            factory="lp.bugs.browser.bugtask.bugtarget_renderer"
            name="target"/>
        <adapter
            provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugtask.IBugTask"
            factory="lp.bugs.browser.bugtask.BugTaskBreadcrumb"
            permission="zope.Public"/>
        <adapter
            provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugmessage.IBugComment"
            factory="lp.bugs.browser.bugcomment.BugCommentBreadcrumb"
            permission="zope.Public"/>

        <!-- NullBugTask -->

        <class
            class="lp.bugs.model.bugtask.NullBugTask">
            <require
                permission="launchpad.View"
                interface="lp.bugs.interfaces.bugtask.IBugTask"/>
            <require
                permission="launchpad.Edit"
                set_schema="lp.bugs.interfaces.bugtask.IBugTask"/>
        </class>

        <!-- BugTaskSet -->

        <class
            class="canonical.launchpad.database.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="canonical.launchpad.database.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>
    </facet>
    <class
        class="canonical.launchpad.database.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="canonical.launchpad.database.BugAttachmentSet">
        <allow
            interface="lp.bugs.interfaces.bugattachment.IBugAttachmentSet"/>
    </class>
    <securedutility
        class="canonical.launchpad.database.BugAttachmentSet"
        provides="lp.bugs.interfaces.bugattachment.IBugAttachmentSet">
        <allow
            interface="lp.bugs.interfaces.bugattachment.IBugAttachmentSet"/>
    </securedutility>
    <facet
        facet="bugs">

        <!-- BugTracker -->

        <class
            class="canonical.launchpad.database.BugTracker">
            <implements
                interface="lp.bugs.interfaces.bugtracker.IBugTracker"/>
            <require
                permission="zope.Public"
                attributes="
                    active
                    aliases
                    baseurl
                    bugtrackertype
                    contactdetails
                    getBugFilingAndSearchLinks
                    getBugsWatching
                    getLinkedPersonByName
                    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="
                    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="canonical.launchpad.webapp.interfaces.IBreadcrumb"
            for="lp.bugs.interfaces.bugtracker.IBugTracker"
            factory="canonical.launchpad.webapp.breadcrumb.TitleBreadcrumb"
            permission="zope.Public"/>

        <!-- BugTrackerSet -->

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

        <!-- BugTrackerAlias -->

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

        <!-- BugTrackerAliasSet -->

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

        <!-- RemoteBug -->

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

    <!-- IBugBranch -->

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

    <!-- hierarchy -->

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

    <!-- BugBranchSet -->

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

    <!-- BugCve -->

    <class
        class="canonical.launchpad.database.BugCve">
        <allow
            interface="lp.bugs.interfaces.bugcve.IBugCve"/>
    </class>
    <facet
        facet="bugs">

        <!-- CVE -->

        <class
            class="canonical.launchpad.database.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="canonical.launchpad.database.CveSet">
            <allow
                interface="lp.bugs.interfaces.cve.ICveSet"/>
        </class>
        <securedutility
            class="canonical.launchpad.database.CveSet"
            provides="lp.bugs.interfaces.cve.ICveSet">
            <allow
                interface="lp.bugs.interfaces.cve.ICveSet"/>
        </securedutility>
    </facet>

    <!-- BugSubscription -->

    <class
        class="canonical.launchpad.database.BugSubscription">
        <allow
            interface="lp.bugs.interfaces.bugsubscription.IBugSubscription"/>
        <require
            permission="zope.Public"
            set_schema="lp.bugs.interfaces.bugsubscription.IBugSubscription"/>
    </class>
    <facet
        facet="bugs">

        <!-- Bug -->

        <class
            class="canonical.launchpad.database.Bug">
            <implements
                interface="lp.bugs.interfaces.bug.IBug"/>
            <allow
                attributes="
                    id
                    private
                    bugtasks
                    default_bugtask
                    affected_pillars
                    permits_expiration
                    can_expire
                    subscriptions
                    syncUpdate
                    date_last_updated
                    getBugTask
                    getDirectSubscribers
                    getDirectSubscriptions
                    getIndirectSubscribers
                    mentoring_offers
                    canMentor
                    isMentor
                    getNullBugTask
                    is_complete
                    who_made_private
                    date_made_private
                    userCanView
                    personIsDirectSubscriber
                    personIsAlsoNotifiedSubscriber
                    personIsSubscribedToDuplicate
                    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
                    watches
                    cves
                    cve_links
                    duplicates
                    attachments
                    questions
                    specifications
                    followup_subject
                    isSubscribed
                    messages
                    getBugNotificationRecipients
                    hasBranch
                    security_related
                    tags
                    getMessageChunks
                    isSubscribedToDupes
                    getSubscribersFromDuplicates
                    getSubscriptionsFromDuplicates
                    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
                    users_affected_with_dupes
                    bug_messages
                    isUserAffected
                    getHWSubmissions
                    isExpirable"/>
            <require
                permission="launchpad.Edit"
                attributes="
                    addChangeNotification
                    addCommentNotification
                    addWatch
                    removeWatch
                    linkCVE
                    linkCVEAndReturnNothing
                    unlinkCVE
                    findCvesInText
                    newMessage
                    linkMessage
                    addAttachment
                    unsubscribeFromDupes
                    subscribe
                    unsubscribe
                    addNomination
                    expireNotifications
                    setStatus
                    setPrivate
                    setSecurityRelated
                    convertToQuestion
                    markUserAffected
                    addTask
                    addChange
                    markAsDuplicate
                    linkHWSubmission
                    unlinkHWSubmission
                    linkBranch
                    unlinkBranch
                    linkAttachment
                    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.AnyPerson"
                attributes="
                    offerMentoring
                    retractMentoring"/>
            <require
                permission="launchpad.Admin"
                attributes="
                    setCommentVisibility
                    setHeat"
                set_attributes="heat_last_updated" />
        </class>
        <adapter
            for="lp.bugs.interfaces.bug.IBug"
            provides="canonical.launchpad.webapp.interfaces.ILaunchpadContainer"
            factory="canonical.launchpad.components.launchpadcontainer.LaunchpadBugContainer"/>
        <adapter
            factory="lp.bugs.browser.bug.bug_description_xhtml_representation"
            name="description"/>

        <!-- BugSet -->

        <class
            class="canonical.launchpad.database.BugSet">
            <allow
                interface="lp.bugs.interfaces.bug.IBugSet"/>
        </class>
        <securedutility
            class="canonical.launchpad.database.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>
    </facet>

    <!-- BugMessage -->

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

    <!-- BugMessageSet -->

    <class
        class="canonical.launchpad.database.BugMessageSet">
        <allow
            interface="lp.bugs.interfaces.bugmessage.IBugMessageSet"/>
    </class>
    <securedutility
        class="canonical.launchpad.database.BugMessageSet"
        provides="lp.bugs.interfaces.bugmessage.IBugMessageSet">
        <allow
            interface="lp.bugs.interfaces.bugmessage.IBugMessageSet"/>
    </securedutility>
    <adapter
        for="lp.bugs.interfaces.bugnomination.IBugNomination"
        provides="canonical.launchpad.webapp.interfaces.IPrimaryContext"
        factory="lp.bugs.browser.bugnomination.BugNominationPrimaryContext"/>
    <facet
        facet="bugs">
        <class
            class="canonical.launchpad.database.BugNomination">
            <require
                permission="launchpad.View"
                attributes="
                    id
                    date_created
                    date_decided
                    distroseries
                    productseries
                    bug
                    owner
                    decider
                    target
                    status
                    isApproved
                    isDeclined
                    isProposed
                    canApprove"/>
            <require
                permission="launchpad.Driver"
                attributes="
                    approve
                    decline"/>
        </class>
        <securedutility
            class="canonical.launchpad.database.BugNominationSet"
            provides="lp.bugs.interfaces.bugnomination.IBugNominationSet">
            <allow
                interface="lp.bugs.interfaces.bugnomination.IBugNominationSet"/>
        </securedutility>
    </facet>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                            zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bug_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBug                            lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bug_edited"/>
    <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="canonical.launchpad.interfaces.IBugSubscription                     zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bugsubscription_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugSubscription                     lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.bugactivity.record_bugsubscription_edited"/>
    <facet
        facet="bugs">

        <!-- BugWatch -->

        <class
            class="canonical.launchpad.database.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"
                set_attributes="
                    last_error_type
                    lastchanged
                    lastchecked
                    needscheck
                    next_check
                    remote_importance
                    remotestatus"/>
        </class>

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


        <!--BugWatchSet -->

        <class
            class="canonical.launchpad.database.BugWatchSet">
            <allow
                interface="lp.bugs.interfaces.bugwatch.IBugWatchSet"/>
            <allow
                interface="zope.app.form.browser.interfaces.IAddFormCustomization"/>
        </class>
        <securedutility
            class="canonical.launchpad.database.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>
    </facet>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 lazr.lifecycle.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.bugactivity.notify_bugtask_added"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="canonical.launchpad.subscribers.karma.bugtask_created"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 zope.lifecycleevent.interfaces.IObjectCreatedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="canonical.launchpad.mailnotification.notify_bugtask_edited"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="canonical.launchpad.subscribers.karma.bugtask_modified"/>
    <subscriber
        for="canonical.launchpad.interfaces.IBugTask                 lazr.lifecycle.interfaces.IObjectModifiedEvent"
        handler="lp.bugs.subscribers.buglastupdated.update_bug_date_last_updated"/>
    <class
        class="canonical.launchpad.database.BugNotification">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotification"/>
        <require
            permission="launchpad.AnyPerson"
            set_schema="lp.bugs.interfaces.bugnotification.IBugNotification"/>
    </class>
    <class
        class="canonical.launchpad.database.BugNotificationRecipient">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotificationRecipient"/>
    </class>
    <class
        class="lp.bugs.mail.bugnotificationrecipients.BugNotificationRecipients">
        <allow
            interface="canonical.launchpad.interfaces.INotificationRecipientSet"/>
    </class>
    <securedutility
        provides="lp.bugs.interfaces.bugnotification.IBugNotificationSet"
        class="canonical.launchpad.database.BugNotificationSet">
        <allow
            interface="lp.bugs.interfaces.bugnotification.IBugNotificationSet"/>
    </securedutility>
    <adapter
        name="bugs"
        provides="canonical.launchpad.webapp.interfaces.IBreadcrumb"
        for="lp.bugs.interfaces.bugtarget.IBugTarget"
        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>

  <class class="lp.bugs.mail.bugnotificationrecipients.BugNotificationRecipientReason">
    <allow attributes="
        bug
        getReason
        mail_header
        recipient"/>
  </class>
</configure>