System Information
- Strapi Version: 4.3.9
- Operating System: Ubuntu 22
- Database: Mysql
- Node Version: 16.14
- NPM Version: 8.5
- Yarn Version:
I have a field “Author” in “article” content-type.
The business logic is such that only author can view/find his articles, not others.
Currently, I have to apply custom logic in every find API, and at other content-types that are related to article. To filter out content not related to author.
My custom logic adds filters in controllers.
The problem is that this custom code is increasing.
Is there a better way like policy or middleware, so that I don’t have to add custom code in every such controllers. And, it is handled at some common place.
Thanks