1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

Limit members search to 50 results to speed up queries

This commit is contained in:
Sylvain 2019-03-11 12:47:46 +01:00
parent a30513d59e
commit 20e91ede4e
2 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@
- Fix a bug: application in unavailable if a SSO is active
- Fix a security issue: dependency bootstrap < 4.3.1 has an XSS vulnerability as described in [CVE-2019-8331](https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/)
- Fixed missing translations in authentication providers form
- Limit members search to 50 results to speed up queries
- [TODO DEPLOY] `bundle install`
## v2.8.3 2019 January 29

View File

@ -38,6 +38,7 @@ class Members::ListService
'FROM "subscriptions" ' \
'WHERE "user_id" = "users"."id")')
.where("users.is_active = 'true' AND roles.name = 'member'")
.limit(50)
query.downcase.split(' ').each do |word|
members = members.where('lower(f_unaccent(profiles.first_name)) ~ :search OR ' \
'lower(f_unaccent(profiles.last_name)) ~ :search',