You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2015/12/02 21:01:41 UTC

[1/2] allura git commit: Bugfix : 8018

Repository: allura
Updated Branches:
  refs/heads/master 74cabfde8 -> f4a9f4223


Bugfix : 8018


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/b46c3575
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/b46c3575
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/b46c3575

Branch: refs/heads/master
Commit: b46c3575bf20d1caca17bb65baefd0ef1642f378
Parents: 74cabfd
Author: dastanforever <pr...@gmail.com>
Authored: Mon Nov 30 14:35:51 2015 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Dec 2 14:49:56 2015 -0500

----------------------------------------------------------------------
 Allura/allura/controllers/auth.py           | 1 +
 Allura/allura/tests/functional/test_auth.py | 1 +
 2 files changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/b46c3575/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index f2043af..1173dbc 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -273,6 +273,7 @@ class AuthController(BaseController):
             h.auditlog_user('Email address verified: %s',  addr.email, user=user)
             if user.pending:
                 plugin.AuthenticationProvider.get(request).activate_user(user)
+                user.set_pref('email_address', addr.email)
         else:
             flash('Unknown verification link', 'error')
 

http://git-wip-us.apache.org/repos/asf/allura/blob/b46c3575/Allura/allura/tests/functional/test_auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_auth.py b/Allura/allura/tests/functional/test_auth.py
index d74ebf0..ed926da 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -755,6 +755,7 @@ class TestAuth(TestController):
             em = M.EmailAddress.get(email='test@example.com')
             assert not user.pending
             assert em.confirmed
+            assert user.get_pref('email_address')
 
     def test_create_account_disabled_header_link(self):
         with h.push_config(config, **{'auth.allow_user_registration': 'false'}):


[2/2] allura git commit: Bugfix 8018

Posted by br...@apache.org.
Bugfix 8018


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/f4a9f422
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/f4a9f422
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/f4a9f422

Branch: refs/heads/master
Commit: f4a9f4223ee51fc54cb3cb24249f95a92af8f808
Parents: b46c357
Author: dastanforever <pr...@gmail.com>
Authored: Wed Dec 2 12:20:17 2015 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Wed Dec 2 14:49:57 2015 -0500

----------------------------------------------------------------------
 Allura/allura/controllers/auth.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/f4a9f422/Allura/allura/controllers/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 1173dbc..27c7c4d 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -271,9 +271,10 @@ class AuthController(BaseController):
             user = addr.claimed_by_user(include_pending=True)
             flash('Email address confirmed')
             h.auditlog_user('Email address verified: %s',  addr.email, user=user)
+            if(user.get_pref('email_address') == None):
+                user.set_pref('email_address', addr.email)
             if user.pending:
                 plugin.AuthenticationProvider.get(request).activate_user(user)
-                user.set_pref('email_address', addr.email)
         else:
             flash('Unknown verification link', 'error')