Skip to content

Commit 85ab892

Browse files
webjunkie01brondsem
authored andcommitted
[#8558] make sure all user prefs changes get indexed by solr
1 parent 85a8e24 commit 85ab892

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Allura/allura/controllers/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def _update_emails(self, user, admin=False, form_params={}):
623623
flash('You must provide your current password to delete an email', 'error')
624624
return
625625
if primary_addr == user.email_addresses[i]:
626-
if select_new_primary_addr(user, ignore_emails=primary_addr) is None \
626+
if select_new_primary_addr(user, ignore_emails=[primary_addr]) is None \
627627
and asbool(config.get('auth.require_email_addr', False)):
628628
flash('You must have at least one verified email address.', 'error')
629629
return

Allura/allura/model/auth.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,11 @@ def registration_date(self):
865865
p = plugin.AuthenticationProvider.get(request)
866866
return p.user_registration_date(self)
867867

868+
# overriding since the old and new values are not being tracked for changes within a dictionary like preferences
869+
# This will ensure any changes get indexed by solr.
870+
def should_update_index(self, old_doc, new_doc):
871+
return True
872+
868873

869874
class ProjectRole(MappedClass):
870875
"""

0 commit comments

Comments
 (0)