docbrown/spec/queries
Jeremy Friesen b4f17ed7dc
Allowing UserQuery to filter on multiple roles (#17919)
I had looked at using `User.with_any_roles` but that creates one User
query per role passed.  Which is not ideal, given that we want to have
an ActiveRecord::Relation object on which we'd paginate.

This adjustment does it's best to mimic Forem's role structure and
adhear to how Rolify builds the underlying query.

An astute reader will notice that in these specs we use `role: "admin"`
and `roles: ["Admin"]`; the primary reason relates the user interface
being worked on in forem/forem#17884.  It is my understanding that the
`role` approach and `roles` approach will be separated by a feature
flag (we're rolling out the `roles` approach).

Related to
- forem/forem#17491
- forem/forem#17884
2022-06-15 08:50:03 -04:00
..
admin Allowing UserQuery to filter on multiple roles (#17919) 2022-06-15 08:50:03 -04:00
articles [15-Minute Fix] Sidebar Tags Show Relevant Posts on Homepage (#13326) 2021-04-09 10:40:09 -06:00
comments Fix spec calc that checks date filter expectation (#17690) 2022-05-16 12:43:18 -06:00
consumer_apps Fixes a name conflict in Rpush models (#15978) 2022-01-07 09:38:16 -06:00
homepage [Hotfix] [Search 2.0] Optimize performance of listings and articles and fix bugs (#13577) 2021-04-29 17:37:59 +02:00