Avoid exception driven logic

This commit is contained in:
Romain Neutron
2014-02-05 14:21:28 +01:00
parent beceb9350b
commit b9e4c599b2
49 changed files with 114 additions and 101 deletions

View File

@@ -28,6 +28,8 @@ class Subdefs implements ControllerProviderInterface
$controllers = $app['controllers_factory'];
$app['firewall']->addMandatoryAuthentication($controllers);
$controllers->before(function (Request $request) use ($app) {
$app['firewall']->requireAccessToModule('admin')
->requireRightOnSbas($request->attributes->get('sbas_id'), 'bas_modify_struct');