I am following DDD architecture for my app. I have App layer, domain layer and data access layer(repository). Let say I would have 3 roles in my app: admin, supervisor, agency. Every role should access data that assigned to itself. So the problem is, should i put query logic in order to filter data by role in Repository like
var query = dataContext.Order.Where(...);
if(userRole = "admin")
query =.... filter by admin
If(usrRole = "supervisor")
query =....
return query.ToList();
I think the logic related to business logic and should put in domain layer. But I havent clear this one. Can you guys clear this out for me?