Merge lp:~michael.nelson/launchpad/458200-p3a into lp:launchpad
Proposed by
Michael Nelson
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~michael.nelson/launchpad/458200-p3a |
Merge into: | lp:launchpad |
Diff against target: |
184 lines (+110/-11) 3 files modified
lib/lp/registry/browser/person.py (+3/-3) lib/lp/registry/browser/tests/person-views.txt (+5/-3) lib/lp/registry/browser/tests/test_person_view.py (+102/-5) |
To merge this branch: | bzr merge lp:~michael.nelson/launchpad/458200-p3a |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Abel Deuring (community) | code | Approve | |
Review via email: mp+14216@code.launchpad.net |
Commit message
Instead of showing the PPA section on a team/person page when there is at least one public ppa, we
show the section when there is at least one ppa that the current user can view.
To post a comment you must log in.
= Summary =
This fixes bug 458200 where members viewing a team would not see the ppa
section if the team had a single private PPA.
== Proposed fix ==
Instead of showing the section when there is at least one public ppa, we
show the section when there is at least one ppa that the current user
can view.
== Pre-implementation notes ==
Muharem and I talked about this together during our pairing session.
== Implementation details ==
I'm a little uncertain about the tests - I couldn't see any other unit
tests for views that used a layer other than LaunchpadZopeless, but I
couldn't use LaunchpadZopeless as otherwise check_permission always
returns true. Is this OK - or is it reflecting that I'm doing something
I shouldn't be (like using check_permission in a view?).
== Tests ==
bin/test -vvt TestShouldShowP paSection
== Demo and Q/A ==
To demo locally:
1. Login as <email address hidden>:test /launchpad. dev/~launchpad and create a new PPA called /launchpad. dev/~launchpad and verify the ppa section is /launchpad. dev/~launchpad and confirm that PPA /launchpad. dev/~launchpad and ensure that the
2. visit https:/
ppaprivate.
3. Click on Administer archive and set the PPA to private (adding an
arbitrary buildd_secret)
4. re-visit https:/
there.
5. Click on active members, then add member, adding cprov.
6. logout, view https:/
section is not displayed.
7. login as <email address hidden>:cprov and confirm that the PPA
section *is* displayed.
8. logout and log back in as foo.bar and add a second ppa called publicppa.
9. logout and visit https:/
PPA section *is* displayed with just the public ppa listed.
10. login as cprov and both are listed.
If you do the same test on RF, point 7 will fail.
For QA we can ask the person on the bug to confirm that they now see the
ppa section.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: registry/ browser/ tests/test_ person_ view.py registry/ browser/ person. py
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ browser/ person. py interface' (No module
117: [F0401] Unable to import 'lazr.delegates' (No module named
delegates)
118: [F0401] Unable to import 'lazr.config' (No module named config)
119: [F0401] Unable to import 'lazr.restful.
named restful)
230: [F0401] Unable to import 'lazr.uri' (No module named uri)
--
Michael