I need to edit/ modify content-manager plugin internal apis so that based on different roles of admin user, i need to apply different filters on the same collection-type
This topic has been created from a Discord post (1257538275682549830) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord
Are you trying to implement multi tenancy?
So i have 3 roles in my admin panel, in which all 3 teams will be viewing and editing the entries in the same collections, but i need to show the entries which are only applicable for the Team type…
i have done that by overriding the content-manager apis
Can you shed more light on how you achieved it as I am interested in it too
So there is a collection type ‘orders’ which is having many to one relation with products,
and i have 2 admin user roles, team 1 and team 2.
In the collection ‘orders’ there is a field called as status which is Enum field, having pending and accepted values.
now i need to show all orders for team 1 but, for team 2 i need to show the orders which are in status:accepted.
to achieve this, i created a typescript file inside extensions//strapi-server.ts
and overrided the find method with logics to handle the filter conditions
Okay, thanks for the insights.