Merge lp:~adeuring/launchpad/bug-1056881-2 into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Abel Deuring on 2012-11-26 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 16312 |
| Proposed branch: | lp:~adeuring/launchpad/bug-1056881-2 |
| Merge into: | lp:launchpad |
| Diff against target: |
166 lines (+47/-21) 4 files modified
lib/lp/blueprints/browser/tests/test_specification.py (+7/-9) lib/lp/registry/configure.zcml (+25/-0) lib/lp/registry/interfaces/product.py (+11/-9) lib/lp/registry/tests/test_product.py (+4/-3) |
| To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-1056881-2 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Richard Harding (community) | 2012-11-26 | Approve on 2012-11-26 | |
|
Review via email:
|
|||
Commit Message
fix permissions issues so that subscribers to a blueprint can view the blueprint page.
Description of the Change
This branch allows subscribers to a proprietary blueprint to view
te blueprint page. (bug 1056881)
My first attempt to fix this bug missed two important points:
1. The main view test, test_view_
now called test_view_
did not require traversal,
2. it just tested that people with an artifact grant can view the
page. Hence the subscribers portlet was empty, which meant that
another permission problem to render the subscribers portlet
was not detected.
So test_view_
getViewBrowser() instead create_
that "proper traversal" is done in the test. This reveealed that
Product.
Redering the subscribers portlet requires access to IProduct.drivers,
so this attribute now alsoe requires the permission lp.LimitedView.
I removed the base classes IHasDrivers and ISpecificationT
from IProductView and added them to IProduct.
There are no permission settings for IProduct itself, only for
several base classes. Since somes attributes defined in IHasDrivers
and ISpecificationT
while others still required lp.View, I specified the permission
attribute-
tests:
./bin/test blueprints -vvt test_view_
./bin/test registry -vvt test_product.
no lint
