The details of my situation: If a user has permissions to view a certain location's items, I need the query to select items that have a facility that matches the permissions the user has. A user might have permissions to multiple facilities. There may be a user that has access to LOC1, LOC2 and also LOC3. There may be a user with only access to LOC1. I might be overlooking something extremely simple to solve this.
if(System.Web.HttpContext.Current.User.IsInRole("App_Inventory_LOC1_Access"))
{
items = items.Where(s => s.Facility == "LOC1");
}
if(System.Web.HttpContext.Current.User.IsInRole("App_Inventory_LOC2_Access"))
{
items = items.Where(s => s.Facility == "LOC2");
}
if(System.Web.HttpContext.Current.User.IsInRole("App_Inventory_LOC3_Access"))
{
items = items.Where(s => s.Facility == "LOC3");
}