launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #01881
[Merge] lp:~stub/launchpad/bug-635430-openid_identity_url into lp:launchpad/devel
Stuart Bishop has proposed merging lp:~stub/launchpad/bug-635430-openid_identity_url into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
#635430 LocationError openid_identity_url on Person +index
https://bugs.launchpad.net/bugs/635430
Fix Bug #635430
--
https://code.launchpad.net/~stub/launchpad/bug-635430-openid_identity_url/+merge/40429
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stub/launchpad/bug-635430-openid_identity_url into lp:launchpad/devel.
=== 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:44 +0000
@@ -19,23 +19,25 @@
<meta tal:condition="view/is_probationary_or_invalid_user"
name="robots" content="noindex,nofollow" />
<tal:openid_delegation condition="view/is_delegated_identity">
- <link rel="openid.server"
- href="https://login.launchpad.net/"
- tal:attributes="href view/openid_server_url" />
- <link rel="openid.delegate"
- href="https://login.launchpad.net/+id/xxxxxxxx"
- tal:attributes="href view/openid_identity_url" />
- <link rel="openid2.provider"
- href="https://login.launchpad.net/"
- tal:attributes="href view/openid_server_url" />
- <link rel="openid2.local_id"
- href="https://login.launchpad.net/+id/xxxxxxxx"
- tal:attributes="href view/openid_identity_url" />
-
- <meta http-equiv="X-XRDS-Location"
- content="https://login.launchpad.net/+id/xxxxxxx/+xrds"
- tal:attributes="content string:${view/openid_identity_url}/+xrds" />
-
+ <tal:has_openid_identity_url condition="view/openid_identity_url">
+ <link rel="openid.server"
+ href="https://login.launchpad.net/"
+ tal:attributes="href view/openid_server_url" />
+ <link rel="openid.delegate"
+ href="https://login.launchpad.net/+id/xxxxxxxx"
+ tal:attributes="href view/openid_identity_url" />
+ <link rel="openid2.provider"
+ href="https://login.launchpad.net/"
+ tal:attributes="href view/openid_server_url" />
+ <link rel="openid2.local_id"
+ href="https://login.launchpad.net/+id/xxxxxxxx"
+ tal:attributes="href view/openid_identity_url" />
+
+ <meta http-equiv="X-XRDS-Location"
+ content="https://login.launchpad.net/+id/xxxxxxx/+xrds"
+ tal:attributes="content string:${view/openid_identity_url}/+xrds"
+ />
+ </tal:has_openid_identity_url>
</tal:openid_delegation>
</tal:block>
</head>
=== 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:44 +0000
@@ -55,8 +55,11 @@
@property
def openid_identity_url(self):
"""See `IOpenIDPersistentIdentity`."""
+ openid_identifier = self.openid_identifier
+ if openid_identifier is None:
+ return None
identity_root_url = allvhosts.configs['openid'].rooturl
- return identity_root_url + self.openid_identifier.encode('ascii')
+ return identity_root_url + openid_identifier.encode('ascii')
@property
def openid_identifier(self):