The matter of consent is much more nuanced than that, but as another comment on this thread points out, the search was not conducted by a police officer, so Fourth Amendment arguments are moot.
He consented to a stranger searching his laptop, and the Fourth Amendment provides no protections against that.