Skip to content

Commit 5794371

Browse files
MarcomTeamweaverryan
MarcomTeam
authored andcommitted
Update voters_data_permission.rst
agreed
1 parent be94cf7 commit 5794371

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cookbook/security/voters_data_permission.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,8 @@ from the security context is called.
207207
public function showAction($id)
208208
{
209209
// get a Post instance
210-
$post = $this->getDoctrine()
211-
->getRepository('AcmeStoreBundle:Post')
212-
->find($id);
213-
210+
$post = ...;
211+
214212
// keep in mind, this will call all registered security voters
215213
if (false === $this->get('security.context')->isGranted('view', $post)) {
216214
throw new AccessDeniedException('Unauthorised access!');

0 commit comments

Comments
 (0)