Merge lp:~adeuring/launchpad/bug-1086043 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Abel Deuring |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16340 |
Proposed branch: | lp:~adeuring/launchpad/bug-1086043 |
Merge into: | lp:launchpad |
Diff against target: |
555 lines (+226/-40) 6 files modified
lib/lp/bugs/browser/tests/test_buglisting.py (+53/-0) lib/lp/registry/configure.zcml (+10/-3) lib/lp/registry/interfaces/productseries.py (+20/-15) lib/lp/registry/tests/test_milestone.py (+67/-12) lib/lp/registry/tests/test_productseries.py (+57/-10) lib/lp/security.py (+19/-0) |
To merge this branch: | bzr merge lp:~adeuring/launchpad/bug-1086043 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Harding (community) | Approve | ||
Review via email: mp+137882@code.launchpad.net |
Commit message
Use the permission launchpad.
Description of the change
This branch fixes 1086043: https:/
if the user subscribed to a bug with a task for a series of a
private project.
The cause of this bug is obvious: A few properties of a product
series and a milestone are displayed in bug listings, so the current
user needs to have the permission to access these properties, even
it they are allowed to view all details about the series/milestone.
In other words: These properties should be proected by the permission
lp.LimitedView, not lp.View. (Before we noicticed this bug, I would
have sworn that we already implemented this...)
Implementation details:
I added the new test class TestPersonBugLi
tests to render a person's bug page when the user is subscribed to
a bug related to a private project.
test_grant_
changes, but the two other tests (where a bug task for a product series
exists, or the bug task is linked to a milestone) needed a few more
changes:
- registry/
lp.LimitedView for some properties of IProductSeries and IMilestone;
- new interface class IProductSeriesL
attributes that are protected by lp.LimitedView. (There no
corresponding change for IMilestone, because the permissions
are specified attribute-
- new security adapters for lp.LimitedView and IProductSeries/
- permision and access tests for IMilestone/
extended.
tests:
./bin/test registry -vvt test_productser
./bin/test bugs -vvt lp.bugs.
./bin/test registry -vvt test_milestone.
- tests that a person bug page can be rendered with an AAG bug with ersies
target and milestone
- permission lp.LimiedView for IMilestone and IProductSeries
no lint
#132
Shouldn't displayname also be moved to the interface like name? It seems
#221
The comment has a duped launchpad.View, I assume one is meant to be LimitedView