Merge lp:~adeuring/launchpad/bug-1056881 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Abel Deuring |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16303 |
Proposed branch: | lp:~adeuring/launchpad/bug-1056881 |
Merge into: | lp:launchpad |
Diff against target: |
395 lines (+228/-13) 6 files modified
lib/lp/blueprints/model/specification.py (+29/-0) lib/lp/blueprints/model/specificationsubscription.py (+30/-3) lib/lp/blueprints/model/tests/test_specification.py (+51/-3) lib/lp/blueprints/model/tests/test_subscription.py (+61/-6) lib/lp/blueprints/tests/test_specification.py (+56/-0) lib/lp/blueprints/tests/test_webservice.py (+1/-1) |
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-1056881 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aaron Bentley (community) | Approve | ||
Review via email: mp+135374@code.launchpad.net |
Commit message
Add an AccessArtifactGrant when somebody is subscribed to a non-publis specification.
Description of the change
This branch fixes bug 1056881: Specifications privacy: subscribers can't see private blueprints
The fix follows the pattern already used for private bugs and branches: When users are subscribed to a private branch or bug and if they do not have a policy grant for the pillar, an artifact grant is created.
Automatically adding grants when somebody is subscribed does not help if a public specification is made proprietary or embargoed, so I changed transitionToInf
Another change: SPecification owners and admins can now unsubscribe other subscribers; before, only the subscribers themselves could do this. This limitation is obviously bad when the owner of a private spec inadvertently subscribes the wrong peron or team, or when an access grant should be revoked after some time.
tests:
./bin/test blueprints -vvt lp.blueprints.
./bin/test blueprints -vvt tests.test_
./bin/test blueprints -vvt tests.test_
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
./lib/lp/
625: E251 no spaces around keyword / parameter equals
659: E251 no spaces around keyword / parameter equals
the errors indicate that we use too long names:
624 product = self.factory.
625 specification_
626 SpecificationSh
This is definitely an improvement. Please ensure a bug is filed about the lack of a subscribed_by field in SpecificationSu bscription, and reference it in the security adapter and test comments. Please fix the too-long lines. You can do this by assigning the enum to a local variable.