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 2021/01/04 15:41:33 UTC
[allura] 01/03: A bit more logging before phone validation
This is an automated email from the ASF dual-hosted git repository.
brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 0cb2f23651e3929adccbeb40b3440a714cdddc26
Author: Dave Brondsema <db...@slashdotmedia.com>
AuthorDate: Wed Dec 30 17:40:32 2020 -0500
A bit more logging before phone validation
---
Allura/allura/lib/plugin.py | 1 +
Allura/allura/tests/test_plugin.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index 8cae469..86806ee 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -910,6 +910,7 @@ class ProjectRegistrationProvider(object):
if not allow_reuse and M.User.query.find({'tool_data.phone_verification.number_hash': number_hash}).count():
return {'status': 'error',
'error': 'That phone number has already been used.'}
+ log.info('PhoneService going to send a verification for: %s', user.username)
return g.phone_service.verify(number)
def check_phone_verification(self, user, request_id, pin, number_hash):
diff --git a/Allura/allura/tests/test_plugin.py b/Allura/allura/tests/test_plugin.py
index 04cd893..f7d8960 100644
--- a/Allura/allura/tests/test_plugin.py
+++ b/Allura/allura/tests/test_plugin.py
@@ -144,6 +144,7 @@ class UserMock(object):
def __init__(self):
self.tool_data = {}
self._projects = []
+ self.username = 'usermock'
def get_tool_data(self, tool, key):
return self.tool_data.get(tool, {}).get(key, None)