Closed
Description
The entire example used throughout https://symfony.com/doc/4.4/security/voters.html (namely checking if a certain user is allowed to edit this specific post) can be achieved with 2 lines in the "edit"-Controller:
if ($post->getOwner() !== $this->getUser()) {
throw new AccessDeniedException();
}
So what's the advantage of setting up this complicated voting system?? This should be explained on the page.