using symfony2.3.4, php5.6.3 , twig.
see, template used symfony everytime user tries access url
, not pass access control set in security.yml
file. want redirect user template of creation/choosing.
if restricting user's access in php
class, sure, ask role/permissions , decide there want use access control have set in security.yml
file, global .html.twig
file replace 1 below.
the page see debug version of 'error' page... should never used in production ... because gives away wayy information ...
i assuming want show users simple 403 error message ... , not stack trace of exception.
so use url without app_dev.php ... see else see... not devs.
the template lives in vendor\symfony\symfony\src\symfony\bundle\twigbundle\resources\views\exception\error.html.twig
in vendors directory under symfony
to replace copy file , put in app directory
app/resources/twigbundle/views/exception/error.html.twig
, change cool...
clear cache php app/console cache:clear -e prod
you should go... :)
ref sf cookbook