diff options
author | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2017-12-06 16:48:31 -0500 |
---|---|---|
committer | Sawyer Bergeron <sbergeron@iol.unh.edu> | 2017-12-07 15:14:01 -0500 |
commit | 9742d5a8d6ee629e99581dc69c491a04f6a2f2ac (patch) | |
tree | 6974d839f5018adcc36dd19232c2aefb37888d0c /src/account/views.py | |
parent | 42763c659dd029cbe2c88e2292f638fd0735825e (diff) |
Integrate Initial Email Support
JIRA: None
Integrate ability for users to change email presented to admins
with field initially filled with user's Jira associated email address
This amend takes into account a streamlining change
suggested by Parker Berbarian
Change-Id: I677ce669f200e5cad70c198737118f0b7925bac5
Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/account/views.py')
-rw-r--r-- | src/account/views.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/account/views.py b/src/account/views.py index 17fbdc3..e6a0e5d 100644 --- a/src/account/views.py +++ b/src/account/views.py @@ -119,6 +119,7 @@ class JiraAuthenticatedView(RedirectView): jira = JIRA(server=settings.JIRA_URL, oauth=oauth_dict) username = jira.current_user() + email = jira.user(username).emailAddress url = '/' # Step 3. Lookup the user or create them if they don't exist. try: @@ -130,6 +131,7 @@ class JiraAuthenticatedView(RedirectView): profile = UserProfile() profile.user = user profile.save() + user.userprofile.email_addr = email url = reverse('account:settings') user.userprofile.oauth_token = access_token['oauth_token'] user.userprofile.oauth_secret = access_token['oauth_token_secret'] |