this.micropostCustomRepository = micropostCustomRepository;
this.securityContextService = securityContextService;
}
@Override
public void delete(Long id) throws NotPermittedException {
<BUG>User currentUser = securityContextService.currentUser();
Micropost micropost = micropostRepository.findOne(id);

if (currentUser != micropost.getUser())
throw new NotPermittedException("no permission to delete this post");

micropostRepository.delete(id);</BUG>
}

this.micropostCustomRepository = micropostCustomRepository;
this.securityContextService = securityContextService;
}
