Hello,

I'm currently working with the security component and I'm trying to find a 
way to render a specialized error message when a user doesn't have access to 
a certain part of my site. Right now, an AccessDeniedException triggers an 
internal server error.

While this makes sense from a programming standpoint, it isn't the kind of 
message I want my users to be seeing as many will likely think the site is 
broken when it really isn't. I'd prefer not to hack the core if possible. Is 
there a way I can display a different template other than the error template 
in FrameworkBundle when a 403 status code is detected? I was thinking I 
could use the status code in my error template to change what's displayed 
but that won't work since the error code is 500 instead of 403. The status 
code is initially 403 when the exception is constructed but it ends up 
getting converted to 500 somewhere along the way.

Any thoughts on a good way to approach this? Or is this not possible without 
hacking the core framework? Thanks!

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to