From 9f525b60709481427761c604a943f17dd5968e38 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Wed, 6 Dec 2017 16:48:31 -0500 Subject: 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 --- dashboard/src/account/views.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'dashboard/src/account/views.py') diff --git a/dashboard/src/account/views.py b/dashboard/src/account/views.py index 17fbdc3..e6a0e5d 100644 --- a/dashboard/src/account/views.py +++ b/dashboard/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'] -- cgit 1.2.3-korg