docbrown/app
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
..
assets Feature/add embed icon to editor toolbar (#17781) 2022-06-10 17:33:23 +05:30
controllers Allowing UserQuery to filter on multiple roles (#17919) 2022-06-15 08:50:03 -04:00
decorators Profile attribute names should be unique and non-empty (#16396) 2022-04-04 12:14:02 -05:00
errors Favoring re-use of authorization error (#16992) 2022-03-24 08:16:28 -04:00
forms Using a Form Object that will persist for the Creator Settings Form (#15684) 2021-12-10 17:07:40 +02:00
helpers create helper for roles and add FF for moderator role (#17737) 2022-05-24 10:46:30 -04:00
javascript Enable clickOutsideDeactivates on Onboarding FocusTrap (#17885) 2022-06-13 08:23:46 -06:00
lib Allowing UserQuery to filter on multiple roles (#17919) 2022-06-15 08:50:03 -04:00
liquid_tags Ensuring that embed fallback renders URL (#17680) 2022-05-17 07:43:17 -04:00
mailers "Reply to" and "From" Email addresses for SMTP Configurations (#16499) 2022-02-16 16:14:54 +02:00
models Allow Moderator Role to adjust post tags (#17858) 2022-06-14 10:55:19 -04:00
policies Allow Moderator Role to adjust post tags (#17858) 2022-06-14 10:55:19 -04:00
queries Allowing UserQuery to filter on multiple roles (#17919) 2022-06-15 08:50:03 -04:00
refinements Drop profile columns from user (#10707) 2020-12-03 08:14:38 +07:00
sanitizers Don't sanitize anchor elements with no href (#16667) 2022-02-22 11:27:38 -06:00
serializers Remove unused methods from User (#16616) 2022-02-18 09:02:17 +07:00
services ✂✂✂ Removing Spam::ArticleHandler (#17860) 2022-06-08 16:34:29 -04:00
uploaders small non-views ruby i18n (#16004) 2022-01-11 10:05:18 +07:00
validators Remove the "Getting Started" Section from the Config (#16033) 2022-01-20 07:31:35 -07:00
view_objects Patching ERB rendering of the data-info JSON (#16067) 2022-01-14 08:30:49 -05:00
views Allow Moderator Role to adjust post tags (#17858) 2022-06-14 10:55:19 -04:00
workers Routine Rubopcop lint fixes (#17844) 2022-06-07 10:17:16 -04:00