bug.transitionToInformationType does not respect BugSharingPolicy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
William Grant |
Bug Description
This bug extends the work of bug 1036185. The default bug creation rule are enforced, but the transition rules are not enforced.
For example I set bugs are proprietary only.
https:/
I reported
https:/
which was proprietary when It was created. The UI would not let me choose another type. I expected an error to be raised when I ran this API function:
def test_bug_
lp = Launchpad.
'testing', service_root='https:/
bug = lp.bugs['939548']
bug.
But there was no error, when I refreshed the page, the bug was public, even though the policy says I will not permit it.
This is roughly what I think is missing.
class BugInformationT
"""The information type is forbidden by the project's BugSharingPolic
Bug.transitionT
if information_type not in self.getAllowed
raise BugSharingPolic
Related branches
- Steve Kowalik (community): Approve (code)
-
Diff: 934 lines (+188/-282)19 files modifiedlib/lp/bugs/browser/bugalsoaffects.py (+1/-1)
lib/lp/bugs/browser/bugtask.py (+11/-21)
lib/lp/bugs/browser/tests/test_bug_views.py (+10/-3)
lib/lp/bugs/browser/tests/test_bugs.py (+1/-1)
lib/lp/bugs/browser/tests/test_bugtask.py (+14/-25)
lib/lp/bugs/doc/bug.txt (+0/-95)
lib/lp/bugs/errors.py (+0/-6)
lib/lp/bugs/mail/tests/test_commands.py (+8/-4)
lib/lp/bugs/model/bug.py (+9/-8)
lib/lp/bugs/model/bugtask.py (+9/-3)
lib/lp/bugs/model/tests/test_bug.py (+38/-7)
lib/lp/bugs/model/tests/test_bugtask.py (+42/-69)
lib/lp/bugs/stories/bug-also-affects/xx-bug-also-affects.txt (+14/-14)
lib/lp/bugs/tests/test_bugs_webservice.py (+7/-3)
lib/lp/code/errors.py (+0/-5)
lib/lp/code/model/branch.py (+3/-3)
lib/lp/code/model/tests/test_branch.py (+11/-14)
lib/lp/registry/enums.py (+4/-0)
lib/lp/registry/errors.py (+6/-0)
tags: |
added: qa-ok removed: qa-needstesting |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
Right, this is what I was working on yesterday, but there's a fair bit of test fallout.