Merge lp:~stub/launchpad/bug-635430-openid_identity_url into lp:launchpad

Proposed by Stuart Bishop
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11916
Proposed branch: lp:~stub/launchpad/bug-635430-openid_identity_url
Merge into: lp:launchpad
Diff against target: 63 lines (+23/-18)
2 files modified
lib/lp/registry/templates/person-index.pt (+19/-17)
lib/lp/services/openid/adapters/openid.py (+4/-1)
To merge this branch: bzr merge lp:~stub/launchpad/bug-635430-openid_identity_url
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+40429@code.launchpad.net

Commit message

[r=lifeless][ui=none][bug=635430] OpenIDPersistentIdentity.openid_identity_url should return None if there are no openid identifiers

Description of the change

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

A test would be nice, but its clearly better fixed than not.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/registry/templates/person-index.pt'
--- lib/lp/registry/templates/person-index.pt 2010-06-18 17:21:12 +0000
+++ lib/lp/registry/templates/person-index.pt 2010-11-09 14:03:58 +0000
@@ -19,23 +19,25 @@
19 <meta tal:condition="view/is_probationary_or_invalid_user"19 <meta tal:condition="view/is_probationary_or_invalid_user"
20 name="robots" content="noindex,nofollow" />20 name="robots" content="noindex,nofollow" />
21 <tal:openid_delegation condition="view/is_delegated_identity">21 <tal:openid_delegation condition="view/is_delegated_identity">
22 <link rel="openid.server"22 <tal:has_openid_identity_url condition="view/openid_identity_url">
23 href="https://login.launchpad.net/"23 <link rel="openid.server"
24 tal:attributes="href view/openid_server_url" />24 href="https://login.launchpad.net/"
25 <link rel="openid.delegate"25 tal:attributes="href view/openid_server_url" />
26 href="https://login.launchpad.net/+id/xxxxxxxx"26 <link rel="openid.delegate"
27 tal:attributes="href view/openid_identity_url" />27 href="https://login.launchpad.net/+id/xxxxxxxx"
28 <link rel="openid2.provider"28 tal:attributes="href view/openid_identity_url" />
29 href="https://login.launchpad.net/"29 <link rel="openid2.provider"
30 tal:attributes="href view/openid_server_url" />30 href="https://login.launchpad.net/"
31 <link rel="openid2.local_id"31 tal:attributes="href view/openid_server_url" />
32 href="https://login.launchpad.net/+id/xxxxxxxx"32 <link rel="openid2.local_id"
33 tal:attributes="href view/openid_identity_url" />33 href="https://login.launchpad.net/+id/xxxxxxxx"
3434 tal:attributes="href view/openid_identity_url" />
35 <meta http-equiv="X-XRDS-Location"35
36 content="https://login.launchpad.net/+id/xxxxxxx/+xrds"36 <meta http-equiv="X-XRDS-Location"
37 tal:attributes="content string:${view/openid_identity_url}/+xrds" />37 content="https://login.launchpad.net/+id/xxxxxxx/+xrds"
3838 tal:attributes="content string:${view/openid_identity_url}/+xrds"
39 />
40 </tal:has_openid_identity_url>
39 </tal:openid_delegation>41 </tal:openid_delegation>
40 </tal:block>42 </tal:block>
41</head>43</head>
4244
=== modified file 'lib/lp/services/openid/adapters/openid.py'
--- lib/lp/services/openid/adapters/openid.py 2010-08-27 12:59:29 +0000
+++ lib/lp/services/openid/adapters/openid.py 2010-11-09 14:03:58 +0000
@@ -55,8 +55,11 @@
55 @property55 @property
56 def openid_identity_url(self):56 def openid_identity_url(self):
57 """See `IOpenIDPersistentIdentity`."""57 """See `IOpenIDPersistentIdentity`."""
58 openid_identifier = self.openid_identifier
59 if openid_identifier is None:
60 return None
58 identity_root_url = allvhosts.configs['openid'].rooturl61 identity_root_url = allvhosts.configs['openid'].rooturl
59 return identity_root_url + self.openid_identifier.encode('ascii')62 return identity_root_url + openid_identifier.encode('ascii')
6063
61 @property64 @property
62 def openid_identifier(self):65 def openid_identifier(self):