launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14331
[Merge] lp:~deryck/launchpad/bugs-embargoed-or-proprietary-1079352 into lp:launchpad
Deryck Hodge has proposed merging lp:~deryck/launchpad/bugs-embargoed-or-proprietary-1079352 into lp:launchpad.
Commit message:
Add an EMBARGOED_OR_PROPRIETARY option to BugSharingPolicy which will allow private projects created with an EMBARGOED information type to have a bug sharing policy that matches everything else.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~deryck/launchpad/bugs-embargoed-or-proprietary-1079352/+merge/134746
This branch ensures that BugSharingPolicy has an EMBARGOED_OR_PROPRIETARY policy just like branches and specifications. Originally, there was no reason to have embargoed bugs, but now that projects can start as EMBARGOED project-wide it makes sense to have a matching policy for Bugs.
The work here is pretty simple -- update the existing test for creating embargoed projects to assert that the bugs policy is EMBARGOED_OR_PROPRIETARY rather than PROPRIETARY. Then, update the BugSharingPolicy and related constants for default and allowed types to get the test passing.
Lint free.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/bugs/interfaces/bugtarget.py
lib/lp/registry/enums.py
lib/lp/registry/model/product.py
lib/lp/registry/tests/test_product.py
--
https://code.launchpad.net/~deryck/launchpad/bugs-embargoed-or-proprietary-1079352/+merge/134746
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~deryck/launchpad/bugs-embargoed-or-proprietary-1079352 into lp:launchpad.
=== modified file 'lib/lp/bugs/interfaces/bugtarget.py'
--- lib/lp/bugs/interfaces/bugtarget.py 2012-10-05 05:34:13 +0000
+++ lib/lp/bugs/interfaces/bugtarget.py 2012-11-16 20:59:28 +0000
@@ -56,6 +56,7 @@
FREE_INFORMATION_TYPES,
InformationType,
NON_EMBARGOED_INFORMATION_TYPES,
+ PROPRIETARY_INFORMATION_TYPES,
)
from lp.bugs.interfaces.bugtask import IBugTask
from lp.bugs.interfaces.bugtasksearch import (
@@ -207,6 +208,7 @@
BugSharingPolicy.PROPRIETARY_OR_PUBLIC: NON_EMBARGOED_INFORMATION_TYPES,
BugSharingPolicy.PROPRIETARY: (InformationType.PROPRIETARY,),
BugSharingPolicy.FORBIDDEN: [],
+ BugSharingPolicy.EMBARGOED_OR_PROPRIETARY: PROPRIETARY_INFORMATION_TYPES,
}
BUG_POLICY_DEFAULT_TYPES = {
@@ -215,6 +217,7 @@
BugSharingPolicy.PROPRIETARY_OR_PUBLIC: InformationType.PROPRIETARY,
BugSharingPolicy.PROPRIETARY: InformationType.PROPRIETARY,
BugSharingPolicy.FORBIDDEN: None,
+ BugSharingPolicy.EMBARGOED_OR_PROPRIETARY: InformationType.EMBARGOED,
}
=== modified file 'lib/lp/registry/enums.py'
--- lib/lp/registry/enums.py 2012-09-21 00:28:49 +0000
+++ lib/lp/registry/enums.py 2012-11-16 20:59:28 +0000
@@ -130,6 +130,14 @@
No new bugs may be reported, but existing bugs may still be updated.
""")
+ EMBARGOED_OR_PROPRIETARY = DBItem(6, """
+ Embargoed, can be proprietary
+
+ New bugs are embargoed, but can be made proprietary later.
+ Only people who can see the project's proprietary information can
+ create new bugs.
+ """)
+
class SpecificationSharingPolicy(DBEnumeratedType):
@@ -176,7 +184,6 @@
""")
-
class TeamMembershipRenewalPolicy(DBEnumeratedType):
"""TeamMembership Renewal Policy.
=== modified file 'lib/lp/registry/model/product.py'
--- lib/lp/registry/model/product.py 2012-11-15 23:05:42 +0000
+++ lib/lp/registry/model/product.py 2012-11-16 20:59:28 +0000
@@ -337,7 +337,7 @@
bug_policy_default = {
InformationType.PUBLIC: BugSharingPolicy.PUBLIC,
InformationType.PROPRIETARY: BugSharingPolicy.PROPRIETARY,
- InformationType.EMBARGOED: BugSharingPolicy.PROPRIETARY,
+ InformationType.EMBARGOED: BugSharingPolicy.EMBARGOED_OR_PROPRIETARY,
}
=== modified file 'lib/lp/registry/tests/test_product.py'
--- lib/lp/registry/tests/test_product.py 2012-11-15 23:05:42 +0000
+++ lib/lp/registry/tests/test_product.py 2012-11-16 20:59:28 +0000
@@ -363,7 +363,7 @@
licenses=[License.OTHER_PROPRIETARY],
information_type=InformationType.EMBARGOED)
self.assertEqual(
- BugSharingPolicy.PROPRIETARY,
+ BugSharingPolicy.EMBARGOED_OR_PROPRIETARY,
product.bug_sharing_policy)
self.assertEqual(
BranchSharingPolicy.EMBARGOED_OR_PROPRIETARY,
Follow ups