You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by gc...@apache.org on 2024/05/09 20:33:17 UTC
(allura) branch gc/8558 created (now 8cb617ce7)
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a change to branch gc/8558
in repository https://gitbox.apache.org/repos/asf/allura.git
at 8cb617ce7 [#8558] make sure all user prefs changes get indexed by solr
This branch includes the following new commits:
new 8cb617ce7 [#8558] make sure all user prefs changes get indexed by solr
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(allura) 01/01: [#8558] make sure all user prefs changes get indexed by solr
Posted by gc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gcruz pushed a commit to branch gc/8558
in repository https://gitbox.apache.org/repos/asf/allura.git
commit 8cb617ce7bf07e97b3cc753d7745783d1742fe6c
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Thu May 9 14:33:08 2024 -0600
[#8558] make sure all user prefs changes get indexed by solr
---
Allura/allura/controllers/auth.py | 2 +-
Allura/allura/model/auth.py | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/Allura/allura/controllers/auth.py b/Allura/allura/controllers/auth.py
index 3f3f82fdb..555ac4d95 100644
--- a/Allura/allura/controllers/auth.py
+++ b/Allura/allura/controllers/auth.py
@@ -623,7 +623,7 @@ class PreferencesController(BaseController):
flash('You must provide your current password to delete an email', 'error')
return
if primary_addr == user.email_addresses[i]:
- if select_new_primary_addr(user, ignore_emails=primary_addr) is None \
+ if select_new_primary_addr(user, ignore_emails=[primary_addr]) is None \
and asbool(config.get('auth.require_email_addr', False)):
flash('You must have at least one verified email address.', 'error')
return
diff --git a/Allura/allura/model/auth.py b/Allura/allura/model/auth.py
index 74652226a..0b73f1b34 100644
--- a/Allura/allura/model/auth.py
+++ b/Allura/allura/model/auth.py
@@ -865,6 +865,11 @@ class User(MappedClass, ActivityNode, ActivityObject, SearchIndexable):
p = plugin.AuthenticationProvider.get(request)
return p.user_registration_date(self)
+ # overriding since the old and new values are not being tracked for changes within a dictionary like preferences
+ # This will ensure any changes get indexed by solr.
+ def should_update_index(self, old_doc, new_doc):
+ return True
+
class ProjectRole(MappedClass):
"""