Do you have any suggestions how to perform authorization of elasticsearch results (using tire) with cancan?
My approach would be to let cancan load and authorize the models and pass in all authorized ids to the tire search or maybe the other way around.
What do you think?
A proper answer would need a bit more code to understand your situation correctly.
But, generally, as an example:
author_ids
property)current_user.id
value) to a term
/terms
filter.Note, that there are many more possible approaches with elasticsearch and Tire, for instance: