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:
parent
a30513d59e
commit
20e91ede4e
@ -5,6 +5,7 @@
|
|||||||
- Fix a bug: application in unavailable if a SSO is active
|
- 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/)
|
- 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
|
- Fixed missing translations in authentication providers form
|
||||||
|
- Limit members search to 50 results to speed up queries
|
||||||
- [TODO DEPLOY] `bundle install`
|
- [TODO DEPLOY] `bundle install`
|
||||||
|
|
||||||
## v2.8.3 2019 January 29
|
## v2.8.3 2019 January 29
|
||||||
|
@ -38,6 +38,7 @@ class Members::ListService
|
|||||||
'FROM "subscriptions" ' \
|
'FROM "subscriptions" ' \
|
||||||
'WHERE "user_id" = "users"."id")')
|
'WHERE "user_id" = "users"."id")')
|
||||||
.where("users.is_active = 'true' AND roles.name = 'member'")
|
.where("users.is_active = 'true' AND roles.name = 'member'")
|
||||||
|
.limit(50)
|
||||||
query.downcase.split(' ').each do |word|
|
query.downcase.split(' ').each do |word|
|
||||||
members = members.where('lower(f_unaccent(profiles.first_name)) ~ :search OR ' \
|
members = members.where('lower(f_unaccent(profiles.first_name)) ~ :search OR ' \
|
||||||
'lower(f_unaccent(profiles.last_name)) ~ :search',
|
'lower(f_unaccent(profiles.last_name)) ~ :search',
|
||||||
|
Loading…
Reference in New Issue
Block a user