Merge lp:~wallyworld/launchpad/subscribe-grants-access-1000045 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Curtis Hovey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 15359 |
Proposed branch: | lp:~wallyworld/launchpad/subscribe-grants-access-1000045 |
Merge into: | lp:launchpad |
Prerequisite: | lp:~wallyworld/launchpad/legacy-unsubscribe-revokes-access-997425 |
Diff against target: |
463 lines (+273/-21) 9 files modified
configs/testrunner/launchpad-lazr.conf (+0/-15) lib/lp/bugs/model/bug.py (+10/-0) lib/lp/bugs/tests/test_bugvisibility.py (+22/-0) lib/lp/registry/interfaces/accesspolicy.py (+1/-1) lib/lp/registry/interfaces/sharingservice.py (+30/-0) lib/lp/registry/services/sharingservice.py (+62/-4) lib/lp/registry/services/tests/test_sharingservice.py (+135/-1) lib/lp/services/features/flags.py (+7/-0) lib/lp/testing/factory.py (+6/-0) |
To merge this branch: | bzr merge lp:~wallyworld/launchpad/subscribe-grants-access-1000045 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Curtis Hovey (community) | code | Approve | |
Review via email: mp+106278@code.launchpad.net |
Commit message
Add model code to grant access to bugs when adding a subscriber and add required sharing service methods
Description of the change
== Implementation ==
This branch provides code to grant access to a bug when a user is subscribed (if the bug is not already visible to the user). This is done right now by triggers, but the triggers will be removed at some point.
Key implementation points:
Add feature flag disclosure.
Add 2 new methods to the sharing service:
- getVisibleArtif
- createAccessGra
The bug subscribe code checks that triggers are removed and if so, checks whether the bug is visible to the subscriber, and if not, grants access.
The permission check in the createAccessGra
== Tests ==
Add tests for the new sharing service methods.
- test_createAcce
- test_getVisible
Add tests for the bug subscription behaviour:
- test_subscribeG
- test_subscribeG
== 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/
1129: E501 line too long (80 characters)
I think this is good to land. We need a bug number for the two XXX, which might be bug 933768 or bug 933938.
I think we will need to revisit the permission rules in a few weeks. The PM team delegates the running of the project to the drivers, who work with the contractors. Drivers do not get to set project-level sharing, but they probably need to manage bugs and branch sharing. We need Matthew to get this answer.