public List <InventoryItemBase> GetItems(UUID userId, List <UUID> itemIds, bool throwOnNotFound) { //verify this user owns the item List <InventoryItemBase> subjectItems = _storage.GetItems(itemIds, throwOnNotFound); foreach (InventoryItemBase subjectItem in subjectItems) { if (subjectItem.Owner != userId) { throw new InventorySecurityException(String.Format("Not retrieving item {0} for user {1}. User does not own the item", subjectItem.ID, userId)); } } return(subjectItems); }