So I came across this method in code:
private void FilterBasedUponPermission(List<Data.Indications.SpWeb_SavedIndications1LightDataObject> list)
{
list.RemoveAll(item =>
(item.Permission == Controllers.Indications.ICConstants.TradeType_LLH && !isLLH) ||
(item.Permission == Controllers.Indications.ICConstants.TradeType_ALM && !isALM) ||
(item.Permission == Controllers.Indications.ICConstants.TradeType_RealEstate && !isRE) ||
(item.Permission == Controllers.Indications.ICConstants.TradeType_Auditor && !isAuditor));
}
However, in the list passed in, some of the permission values are null, and it’s keeping them in the filtered list. I want it to remove the items that also don’t have a permission set, not just the ones that don’t match the permission that you have as a user.
Thanks!
Just add a item.Permission == null