Merge lp:~daker/summit/fix.611294 into lp:summit

Proposed by Adnane Belmadiaf on 2013-02-04
Status: Merged
Approved by: Michael Hall on 2013-02-19
Approved revision: 480
Merged at revision: 480
Proposed branch: lp:~daker/summit/fix.611294
Merge into: lp:summit
Diff against target: 73 lines (+7/-16)
2 files modified
summit/common/launchpad.py (+2/-10)
summit/settings.py (+5/-6)
To merge this branch: bzr merge lp:~daker/summit/fix.611294
Reviewer Review Type Date Requested Status
Michael Hall (community) 2013-02-04 Approve on 2013-02-19
Review via email: mp+146535@code.launchpad.net

Commit message

Transition to login.ubuntu.com

Description of the change

Run manage.py update-openids to fix the claimed_id for all the users

To post a comment you must log in.
Michael Hall (mhall119) wrote :

Looks good, IS will need to run update_openids after deploying

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'summit/common/launchpad.py'
2--- summit/common/launchpad.py 2012-08-09 15:53:51 +0000
3+++ summit/common/launchpad.py 2013-02-04 23:24:21 +0000
4@@ -1,14 +1,7 @@
5 # -*- coding: utf-8 -*-
6-
7+from django.conf import settings
8 from launchpadlib.launchpad import Launchpad
9-from launchpadlib.errors import HTTPError
10-
11-from django.conf import settings
12-
13-from django.contrib.auth.models import User
14-
15 import os
16-import sys
17
18
19 def is_debug_user(username):
20@@ -45,11 +38,10 @@
21 html = f.read()
22 services = OpenIDServiceEndpoint().fromHTML(url, html)
23 if services is not None and len(services) > 0:
24+ services[0].local_id = services[0].local_id.replace('launchpad.net', 'ubuntu.com')
25 return services[0]
26 else:
27 return None
28- # ... or use this line if you want the Ubuntu SSO OpenID:
29- # return services[0].local_id.replace('launchpad.net', 'ubuntu.com')
30
31
32 def set_user_openid(user, force=False):
33
34=== modified file 'summit/settings.py'
35--- summit/settings.py 2012-12-15 02:06:56 +0000
36+++ summit/settings.py 2013-02-04 23:24:21 +0000
37@@ -17,7 +17,6 @@
38 # Django settings for The Summit Scheduler project.
39
40 import os
41-import sys
42
43 PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
44
45@@ -26,8 +25,8 @@
46
47 SERVE_STATIC = True
48
49-OPENID_STRICT_USERNAMES=True
50-OPENID_FOLLOW_RENAMES=True
51+OPENID_STRICT_USERNAMES = True
52+OPENID_FOLLOW_RENAMES = True
53 OPENID_SREG_REQUIRED_FIELDS = ['email']
54
55 SITE_ROOT = 'http://summit.ubuntu.com'
56@@ -152,7 +151,7 @@
57
58 # If set, always use this as the identity URL rather than asking the
59 # user. This only makes sense if it is a server URL.
60-OPENID_SSO_SERVER_URL = 'https://login.launchpad.net/'
61+OPENID_SSO_SERVER_URL = 'https://login.ubuntu.com/'
62
63 # Tell django.contrib.auth to use the OpenID signin URLs.
64 LOGIN_URL = '/openid/login'
65@@ -190,6 +189,6 @@
66
67 import logging
68 try:
69- from local_settings import *
70+ from local_settings import *
71 except ImportError:
72- logging.warning("No local_settings.py were found. See INSTALL for instructions.")
73+ logging.warning("No local_settings.py were found. See INSTALL for instructions.")

Subscribers

People subscribed via source and target branches