Merge lp:~wallyworld/launchpad/create-aag-privacy-transitions2-1009364 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | William Grant on 2012-06-18 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15437 |
| Proposed branch: | lp:~wallyworld/launchpad/create-aag-privacy-transitions2-1009364 |
| Merge into: | lp:launchpad |
| Diff against target: | 0 lines |
| To merge this branch: | bzr merge lp:~wallyworld/launchpad/create-aag-privacy-transitions2-1009364 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| William Grant | code | 2012-06-18 | Approve on 2012-06-18 |
|
Review via email:
|
|||
Commit Message
New findPeopleWitho
Description of the Change
== Implementation ==
This branch ensures that, with the legacy bug visibility triggers removed, when a bug transitions to private, any direct subscribers are granted access to the bug.
A new set of model methods was added - get/findPeopleW
A couple of issues were encountered along the way and fixed.
The IBugTaskSet.
There was duplicate code to disable triggers due to separate landings. I kept the one which was done as a test fixture since this is required for existing uses.
The code to check whether a bug is visible to a subscriber calls searchBugIds() which requires that the bug has a bugtask or else it returns false. The createBug() method added subscribers before creating the default bugtask and so public bugs were having AAG's created. I changed the order of the code to address this.
== Tests ==
Add tests to test_sharingservice and test_accesspolicy to test the new get/findPeopleW
Add a new test test_transition
== Lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
| Ian Booth (wallyworld) wrote : | # |
| William Grant (wgrant) wrote : | # |
Thanks for addressing my comments. I have a few new ones:
312 +from storm.expr import (
This should be in the third-party section, after the lazr imports.
371 + # Determine the pillars via which an access policy grant will give
372 + # access.
373 + affected_pillars = []
374 + if access_
375 + affected_pillars = concrete_
376 + else:
377 + target_context = concrete_
378 + if IPillar.
379 + affected_
Can't you run getPeopleWithou
403 + AccessPolicyGra
404 + access_artifact.id,
405 + AccessPolicyGra
406 + TeamParticipati
This looks like it'd be fine with AccessArtifactG
| Ian Booth (wallyworld) wrote : | # |
Thanks for the suggestions, I think everything is ok now. The test
still passes with the modified query.
| William Grant (wgrant) wrote : | # |
Thanks. One last trivial thing:
309 from lazr.restful.utils import (
310 get_current_
311 )
312 +
313 +from storm.expr import (
That blank line shouldn't be there.

I've moved the getPeopleWithou tAccess( ) code completely to the sharing service and fixed the implementation and enhanced the test to check that people with either APG or AAG are properly accounted for.