Merge lp:~adeuring/launchpad/use-access-grants-for-specifications-auth-check into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Abel Deuring on 2012-09-11 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 15945 |
| Proposed branch: | lp:~adeuring/launchpad/use-access-grants-for-specifications-auth-check |
| Merge into: | lp:launchpad |
| Diff against target: |
336 lines (+155/-36) 5 files modified
lib/lp/blueprints/browser/tests/test_specification.py (+11/-2) lib/lp/blueprints/model/specification.py (+58/-9) lib/lp/blueprints/tests/test_specification.py (+81/-23) lib/lp/registry/model/accesspolicy.py (+1/-0) lib/lp/testing/factory.py (+4/-2) |
| To merge this branch: | bzr merge lp:~adeuring/launchpad/use-access-grants-for-specifications-auth-check |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Richard Harding (community) | 2012-09-11 | Approve on 2012-09-11 | |
|
Review via email:
|
|||
Commit Message
Use access grant tables for permission checks of ISpeicifcation.
Description of the Change
This branch changes the metod SPeicifcation.
uses access grants to check if a user may view a given specification.
For non-public specifications, this requires an access grant on either
the specification's target or on the specification itself.
The related tests required some changes. Most importantly, calling
specification.
Unauthorized because the owner of a specification does not get at present
automatically a view grant if the specification is made non-public.
This should be fixed of course, but can be done in another branch --
it does not matter here, if transitionToInf
a product owner or a specification owner.
The test test_special_
userCanView() does no longer check a user's role in the project.
test:
./bin/test -vvt lp.blueprints.
no lint
