We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent be94cf7 commit 5794371Copy full SHA for 5794371
cookbook/security/voters_data_permission.rst
@@ -207,10 +207,8 @@ from the security context is called.
207
public function showAction($id)
208
{
209
// get a Post instance
210
- $post = $this->getDoctrine()
211
- ->getRepository('AcmeStoreBundle:Post')
212
- ->find($id);
213
-
+ $post = ...;
+
214
// keep in mind, this will call all registered security voters
215
if (false === $this->get('security.context')->isGranted('view', $post)) {
216
throw new AccessDeniedException('Unauthorised access!');
0 commit comments