Merge lp://staging/~wgrant/launchpad/bug-433385 into lp://staging/launchpad
Proposed by
William Grant
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp://staging/~wgrant/launchpad/bug-433385 |
Merge into: | lp://staging/launchpad |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~wgrant/launchpad/bug-433385 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | Approve | ||
Review via email: mp+12134@code.staging.launchpad.net |
Commit message
Unbreak access to unclaimed profiles with hidden email addresses
To post a comment you must log in.
= Summary =
ensurePerson now creates unclaimed Persons with hide_email_ addresses set. PersonView. context_ is_probably_ team assumes that the user can always see the Person's EmailAddresses, which is no longer the case.
This is a perfectly valid (and arguably more correct) state for the data, so the view needs to handle it.
== Proposed fix ==
Use removeSecurityProxy on the EmailAddresses before attempting to access their 'email' attribute.
== Pre-implementation notes ==
None. It was affecting me locally, so I JFDI.
== Implementation details ==
Nothing special.
== Tests ==
I amended an existing team claim test to hide the Person's email addresses first.
bin/test -vvt xx-team-claim.txt
== Demo and Q/A ==
This is difficult without DB access. On the production DB, you would need to identify an unclaimed person created in the past 11 or so days by gina (the only LP instance that I know to have the relevant CP), then attempt to view that Person's index. If this fix works, you will receive a 403 on production, but a success on edge.
= 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/ person. py registry/ stories/ foaf/xx- team-claim. txt
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ registry/ browser/ person. py interface' (No module named restful)
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.