allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [12/26] git commit: [#7656] ticket:648 Add default search fields for user & additional fields examples
Date Fri, 19 Sep 2014 20:04:26 GMT
[#7656] ticket:648 Add default search fields for user & additional fields examples


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/097c8505
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/097c8505
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/097c8505

Branch: refs/heads/master
Commit: 097c8505abbcd844f6fee227df45f6c9292732cc
Parents: 5029fc0
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Sep 9 14:24:39 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Fri Sep 19 19:35:40 2014 +0000

----------------------------------------------------------------------
 Allura/allura/controllers/site_admin.py | 2 +-
 Allura/development.ini                  | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/097c8505/Allura/allura/controllers/site_admin.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/site_admin.py b/Allura/allura/controllers/site_admin.py
index b19b84b..40c69f2 100644
--- a/Allura/allura/controllers/site_admin.py
+++ b/Allura/allura/controllers/site_admin.py
@@ -358,7 +358,7 @@ class SiteAdminController(object):
                               limit=validators.Int(if_invalid=None),
                               page=validators.Int(if_empty=0, if_invalid=0)))
     def search_users(self, q=None, f=None, page=0, limit=None, **kw):
-        fields = []
+        fields = [('username', 'username'), ('display_name', 'display name')]
         add_fields = aslist(tg.config.get('search.user.additional_fields'), ',')
         r = self._search(M.User, fields, add_fields, q, f, page, limit, **kw)
         r['search_results_template'] = 'allura:templates/site_admin_search_users_results.html'

http://git-wip-us.apache.org/repos/asf/allura/blob/097c8505/Allura/development.ini
----------------------------------------------------------------------
diff --git a/Allura/development.ini b/Allura/development.ini
index 80275d5..ab0c114 100644
--- a/Allura/development.ini
+++ b/Allura/development.ini
@@ -120,9 +120,10 @@ user_prefs_storage.method = local
 user_prefs_storage.ldap.fields.display_name = cn
 
 
-# Additional fields for admin project search (/nf/admin/search_projects/)
+# Additional fields for admin project/user search
 # Note: whitespace after comma is important!
 # search.project.additional_fields = private, url, title
+# search.user.additional_fields = email_addresses
 
 # Set the locations of some static resources
 #  script_name is the path that is handled by the application


Mime
View raw message