At work. User want to log data to elasticsearch(development by C#, NEST, ..)
In the system, I have a lot user with multiple roles in my sql and UI search data from elasticsearch.
But I have a problem. User want to login userA (roles are "admin", "manager", "companyA") from webapp. So when user has updated some information and that will store to mysql and elasticsearch.
After User login to userB (roles are "manager", "companyB"). User go to search page of elasticsearch.
User should see own data .
UserB cant see data of userA because UserB is employee of companyB.
How to do that? Please help me.