Mirage
Mirage

Reputation: 31548

How can i have custom access denied page in symfony2

I am using JMS Security bundle to secure methods and controllers. When non previleged user access the secure page then i get this error

Token does not have the required roles.

Is there any way , i can make that custom page and more defined error message

Upvotes: 1

Views: 3407

Answers (1)

moonwave99
moonwave99

Reputation: 22817

If JMSSecurityExtraBundle answers you with a 403 error [and it should], you may customize it following Symfony guidelines.

Upvotes: 4

Related Questions