Merge lp:~jcsackett/launchpad/filter-milestone-vocabulary-for-projectgroups into lp:launchpad
Status: | Merged |
---|---|
Approved by: | j.c.sackett |
Approved revision: | no longer in the source branch. |
Merged at revision: | 16285 |
Proposed branch: | lp:~jcsackett/launchpad/filter-milestone-vocabulary-for-projectgroups |
Merge into: | lp:launchpad |
Diff against target: |
83 lines (+35/-5) 2 files modified
lib/lp/registry/model/projectgroup.py (+6/-2) lib/lp/registry/tests/test_milestone_vocabularies.py (+29/-3) |
To merge this branch: | bzr merge lp:~jcsackett/launchpad/filter-milestone-vocabulary-for-projectgroups |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+134667@code.launchpad.net |
Commit message
Updates project group milestone filtering to not display milestones from associated private products if the user shouldn't see them.
Description of the change
Summary
=======
As it currently stands, when milestones are fetched for a projectgroup, the
milestones from all associated products are fetched, regardless of whether or
not they belong to a private product the current user cannot see.
Projectgroup must be updated to not show milestones the user can't see, using
our existing filtering clause.
Preimp
======
None.
Implementation
==============
The method `ProjectGroup`
fetch milestones, is updated to pull the current user from the launchbag and
create the privacy filtering clause from that. It then adds that clause to the
existing query.
Tests have also been updated for this case.
Tests
=====
bin/test -vvct TestMilestoneVo
QA
==
Ensure the milestones listed for a project does not include anything from
associated private products.
LoC
===
Part of private projects.
Lint
====
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
Looks good.
But I am wondering if we need to change the expression returned by ProductSet. getProductPriva cyFilter( ):
Users may have an artifact grant for a bug/branch/ blueprint of a private product but not a policy grant for the product itself; I suspect that we should add a clause like APGF.artifact == None to address this case.
But this affects of course other callsites of getProductPriva cyFilter( ), so we should probably talk about it in our standup call on Monday.