add tests for authentication/authorization

Check the user which access to creation, modification, list, is
authorized to see the user and have the permissions on activity.
This commit is contained in:
2015-10-27 21:11:26 +01:00
parent 7ce86ab15f
commit fc8c018159
2 changed files with 148 additions and 8 deletions

View File

@@ -160,6 +160,8 @@ class ActivityController extends Controller
$entity->setPerson($person);
$entity->setDate(new \DateTime('now'));
$this->denyAccessUnlessGranted('CHILL_ACTIVITY_CREATE', $entity);
$form = $this->createCreateForm($entity, $person);
return $this->render('ChillActivityBundle:Activity:new.html.twig', array(