Merge lp:~wallyworld/launchpad/unassign-private-bug into lp:launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Robert Collins | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12650 | ||||
Proposed branch: | lp:~wallyworld/launchpad/unassign-private-bug | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
182 lines (+87/-36) 4 files modified
lib/lp/bugs/model/bug.py (+3/-0) lib/lp/bugs/model/bugtask.py (+5/-2) lib/lp/bugs/tests/test_bugchanges.py (+79/-33) lib/lp/bugs/tests/test_bugvisibility.py (+0/-1) |
||||
To merge this branch: | bzr merge lp:~wallyworld/launchpad/unassign-private-bug | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Collins (community) | Approve | ||
Review via email: mp+53945@code.launchpad.net |
Commit message
[r=lifeless][bug=717609] Add ability to manually cache view access permission for a user on a bug during the processing of object modification events.
Description of the change
Add ability to manually cache view access permission for a user on a bug during the processing of object modification events.
== Implementation ==
When a user unassigns or unsubscribes themselves from a private bug, an event listener is used to send out notifications to subscribers etc. However, when this happens, the bug is now not visible to the user since they have already been unassigned/
== Tests ==
Added new tests to TestPrivateBugV
test_
test_
== Lint ==
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
This seems much more complex than needed.
When unassigning, you know the current /user/ has permission
All you need to do is unconditionally add that user to the cache. I couldn't really make heads or tails of your logic - and it looks to do db lookups that aren't needed.
Sorry to be a wet blanket, but I think simpler is better here.