Merge lp:~wallyworld/launchpad/sharing-details-delete2-966641 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15067 |
Proposed branch: | lp:~wallyworld/launchpad/sharing-details-delete2-966641 |
Merge into: | lp:launchpad |
Prerequisite: | lp:~wallyworld/launchpad/sharing-details-delete-966641 |
Diff against target: |
323 lines (+198/-12) 8 files modified
lib/lp/registry/browser/pillar.py (+1/-1) lib/lp/registry/browser/tests/test_pillar_sharing.py (+1/-1) lib/lp/registry/interfaces/accesspolicy.py (+15/-5) lib/lp/registry/interfaces/sharingservice.py (+20/-0) lib/lp/registry/model/accesspolicy.py (+9/-5) lib/lp/registry/services/sharingservice.py (+21/-0) lib/lp/registry/services/tests/test_sharingservice.py (+97/-0) lib/lp/registry/tests/test_accesspolicy.py (+34/-0) |
To merge this branch: | bzr merge lp:~wallyworld/launchpad/sharing-details-delete2-966641 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email:
|
Commit message
Add sharing service api for revoking access to bugs and branches
Description of the change
== Implementation ==
Add new API to sharing service:
def revokeAccessGra
"""Remove a sharee's access to the specified artifacts.
This is used by the delete button on the sharing details page to revoke a user's access to a bug or branch.
The findByArtifact and revokeByArtifact methods on IAccessArtifact
I also had to change the sharing details view - it was putting bugtask urls into the view data model but instead needed to use bug urls. Our disclosure data model deals with bugs, not bugtasks.
== Tests ==
Add new revokeAccessGrants tests to test_sharingservice
Add new tests for the findByArtifact and revokeByArtifact methods to test_accesspolicy
== Lint ==
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
I do not understand line 23. user-data and security bugs can be shared by projects. I may only maintain the second or third project, so the following code bugtask. importance. title.lower( )
importance = bug.default_
returns the importance the oldest bugtask found. Since my project is not the oldest task, it is not the default -- that importance is wrong.
Also the links are made to the bug, which I think chooses the first/oldest bugtask as well -- the context is not my project so the bugtask index page renders the links in the side portlets for the other project, not mine. I think test_pillar_sharing could have a test with for a second task that demonstrates that this code is providing data for the wrong task.