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 2016/02/05 18:32:12 UTC
[1/5] allura git commit: missing tests passed.
Repository: allura
Updated Branches:
refs/heads/master 7336d1475 -> ae3ea6aba
missing tests passed.
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/ae3ea6ab
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/ae3ea6ab
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/ae3ea6ab
Branch: refs/heads/master
Commit: ae3ea6abab7406b6ccd95f34df82d452060bb3b4
Parents: 0ae6aa0
Author: dastanforever <pr...@gmail.com>
Authored: Wed Jan 27 20:17:56 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/tests/functional/test_auth.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/ae3ea6ab/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 ab3ddea..38e57ad 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -1334,7 +1334,7 @@ class TestPasswordReset(TestController):
email.confirmed = True
ThreadLocalORMSession.flush_all()
old_pw_hash = user.password
- with td.audits('Password recovery link sent to: test-admin@users.localhost', user=True):
+ with td.audits('Password recovery link sent to: '+ email.email, user=True):
r = self.app.post('/auth/password_recovery_hash', {'email': email.email,
'_session_id': self.app.cookies['_session_id'],
})
[4/5] allura git commit: All four passed.
Posted by br...@apache.org.
All four passed.
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/0ae6aa09
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/0ae6aa09
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/0ae6aa09
Branch: refs/heads/master
Commit: 0ae6aa09a93f716d2741506da3b3cce46b750cb2
Parents: a9d9ae0
Author: dastanforever <pr...@gmail.com>
Authored: Sat Jan 16 13:00:27 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/tests/functional/test_site_admin.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/0ae6aa09/Allura/allura/tests/functional/test_site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/functional/test_site_admin.py b/Allura/allura/tests/functional/test_site_admin.py
index b55dcbc..a8fa810 100644
--- a/Allura/allura/tests/functional/test_site_admin.py
+++ b/Allura/allura/tests/functional/test_site_admin.py
@@ -676,14 +676,15 @@ class TestUserDetails(TestController):
'username': 'test-user',
'addr-1.ord': '1',
'addr-2.ord': '2',
- 'addr-2.delete': 'on',
+ 'addr-3.ord': '3',
+ 'addr-3.delete': 'on',
'new_addr.addr': '',
'primary_addr': 'test2@example.com'},
extra_environ=dict(username='test-admin'))
r = self.app.get('/nf/admin/user/test-user')
user = M.User.query.get(username='test-user')
# test@example.com set as primary since test2@example.com is deleted
- assert_equal(user.get_pref('email_address'), 'test@example.com')
+ assert_equal(user.get_pref('email_address'), 'test-user@allura.local')
@patch.object(LocalAuthenticationProvider, 'set_password')
def test_set_random_password(self, set_password):
[3/5] allura git commit: [#8032] Default email id's created and
confirmed.
Posted by br...@apache.org.
[#8032] Default email id's created and confirmed.
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/9caa879e
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/9caa879e
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/9caa879e
Branch: refs/heads/master
Commit: 9caa879e77de6b60a07fcd0040ba94e410612f81
Parents: 7336d14
Author: dastanforever <pr...@gmail.com>
Authored: Fri Dec 18 12:30:49 2015 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/websetup/bootstrap.py | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/9caa879e/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 8bc04fe..111b4e3 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -338,6 +338,12 @@ def create_user(display_name, username=None, password='foo', make_project=False)
user = M.User.register(dict(username=username,
display_name=display_name),
make_project=make_project)
+ email = username+"@allura.local"
+ user.claim_address(email)
+ from allura.model.auth import EmailAddress
+ kw = {"email": email}
+ em = EmailAddress.get(**kw)
+ em.confirmed = True
user.set_password(password)
return user
[5/5] allura git commit: [#8032] make email addresses primary.
Posted by br...@apache.org.
[#8032] make email addresses primary.
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/d4a1819a
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/d4a1819a
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/d4a1819a
Branch: refs/heads/master
Commit: d4a1819a2734396f39e29920037bd3969f5cbd25
Parents: 9caa879
Author: dastanforever <pr...@gmail.com>
Authored: Mon Jan 11 11:07:23 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/websetup/bootstrap.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/d4a1819a/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index 111b4e3..f9cc65d 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -344,6 +344,7 @@ def create_user(display_name, username=None, password='foo', make_project=False)
kw = {"email": email}
em = EmailAddress.get(**kw)
em.confirmed = True
+ user.set_pref('email_address',email)
user.set_password(password)
return user
[2/5] allura git commit: Three passed
Posted by br...@apache.org.
Three passed
Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/a9d9ae0b
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/a9d9ae0b
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/a9d9ae0b
Branch: refs/heads/master
Commit: a9d9ae0b46b97a6bacef496caa2c9ec884ffd5da
Parents: d4a1819
Author: dastanforever <pr...@gmail.com>
Authored: Fri Jan 15 22:34:24 2016 +0530
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Feb 5 12:22:44 2016 -0500
----------------------------------------------------------------------
Allura/allura/model/auth.py | 6 +++++-
Allura/allura/tests/functional/test_auth.py | 6 +++---
Allura/allura/websetup/bootstrap.py | 1 +
3 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/allura/blob/a9d9ae0b/Allura/allura/model/auth.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 34d0877..7f6442c 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -196,8 +196,12 @@ class EmailAddress(MappedClass):
message_id=h.gen_message_id(),
text=text)
- def send_verification_link(self):
+ def set_nonce_hash(self):
self.nonce = sha256(os.urandom(10)).hexdigest()
+ return True
+
+ def send_verification_link(self):
+ self.set_nonce_hash()
log.info('Sending verification link to %s', self.email)
text = '''
To verify the email address %s belongs to the user %s,
http://git-wip-us.apache.org/repos/asf/allura/blob/a9d9ae0b/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 8e491a6..ab3ddea 100644
--- a/Allura/allura/tests/functional/test_auth.py
+++ b/Allura/allura/tests/functional/test_auth.py
@@ -257,14 +257,14 @@ class TestAuth(TestController):
assert json.loads(self.webflash(r))['message'] == 'A verification email has been sent. ' \
'Please check your email and click to confirm.'
assert sendsimplemail.post.called
- assert len(M.User.query.get(username='test-admin').email_addresses) == addresses_number + 1
+ assert len(M.User.query.get(username='test-user-1').email_addresses) == addresses_number + 1
assert len(M.EmailAddress.find(dict(email=email_address)).all()) == 2
@td.with_user_project('test-admin')
@patch('allura.tasks.mail_tasks.sendsimplemail')
@patch('allura.lib.helpers.gen_message_id')
def test_user_cannot_claim_more_than_max_limit(self, gen_message_id, sendsimplemail):
- with h.push_config(config, **{'user_prefs.maximum_claimed_emails': '1'}):
+ with h.push_config(config, **{'user_prefs.maximum_claimed_emails': '2'}):
self.app.get('/') # establish session
r = self.app.post('/auth/preferences/update_emails',
params={
@@ -290,7 +290,7 @@ class TestAuth(TestController):
extra_environ=dict(username='test-user-1'))
assert json.loads(self.webflash(r))['status'] == 'error'
- assert json.loads(self.webflash(r))['message'] == 'You cannot claim more than 1 email addresses.'
+ assert json.loads(self.webflash(r))['message'] == 'You cannot claim more than 2 email addresses.'
@patch('allura.tasks.mail_tasks.sendsimplemail')
@patch('allura.lib.helpers.gen_message_id')
http://git-wip-us.apache.org/repos/asf/allura/blob/a9d9ae0b/Allura/allura/websetup/bootstrap.py
----------------------------------------------------------------------
diff --git a/Allura/allura/websetup/bootstrap.py b/Allura/allura/websetup/bootstrap.py
index f9cc65d..fbbc211 100644
--- a/Allura/allura/websetup/bootstrap.py
+++ b/Allura/allura/websetup/bootstrap.py
@@ -344,6 +344,7 @@ def create_user(display_name, username=None, password='foo', make_project=False)
kw = {"email": email}
em = EmailAddress.get(**kw)
em.confirmed = True
+ em.set_nonce_hash()
user.set_pref('email_address',email)
user.set_password(password)
return user