This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git

commit 9f9ae7cb404b19d1c6609e7c0d0dc3b6bb7018b4
Author: Dave Brondsema <[email protected]>
AuthorDate: Wed Sep 1 13:51:50 2021 -0400

    Remove some tool_data.sfx.userid mentions (not part Allura itself)
---
 Allura/allura/controllers/auth.py | 2 +-
 Allura/allura/lib/plugin.py       | 9 +++++++--
 Allura/allura/model/auth.py       | 2 +-
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Allura/allura/controllers/auth.py 
b/Allura/allura/controllers/auth.py
index ce43f12..c1689be 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -234,7 +234,7 @@ class AuthController(BaseController):
                       'an email has been sent to the account\'s primary email 
address.'
             email_record = 
M.EmailAddress.get(email=provider.get_primary_email_address(user_record=user_record),
                                               confirmed=False)
-            provider.resend_verification_link(user_record.get_tool_data('sfx', 
'userid'))
+            provider.resend_verification_link(user_record, email_record)
 
         elif not allow_non_primary_email_reset:
             message = 'If the given email address is on record, '\
diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
index be930de..0d46a8a 100644
--- a/Allura/allura/lib/plugin.py
+++ b/Allura/allura/lib/plugin.py
@@ -307,8 +307,13 @@ class AuthenticationProvider(object):
         '''
         raise NotImplementedError('set_password')
 
-    def resend_verification_link(em):
-        em.send_verification_link()
+    def resend_verification_link(self, user, email):
+        '''
+        :type user: :class:`allura.model.auth.User`
+        :type email: :class:`allura.model.auth.EmailAddress`
+        :rtype: None
+        '''
+        email.send_verification_link()
 
     def upload_sshkey(self, username, pubkey):
         '''
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 49915e2..0456d1b 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -232,7 +232,7 @@ class User(MappedClass, ActivityNode, ActivityObject, 
SearchIndexable):
     class __mongometa__:
         name = str('user')
         session = main_orm_session
-        indexes = ['tool_data.sfx.userid', 'tool_data.AuthPasswordReset.hash']
+        indexes = ['tool_data.AuthPasswordReset.hash']
         unique_indexes = ['username']
         custom_indexes = [
             dict(fields=('tool_data.phone_verification.number_hash',), 
sparse=True),

Reply via email to