Something else instead of you are not authorized

Whenever A user tries to access an action not specified for him he gets

you are not authorized

I would like to show a custom message.

I would even like top replace this message

Error 404

The system is unable to find the requested action "minzyz".

with a custom message

How Can I achieve that?


You should be able to set the message property of CAccessControlFilter: in your controller. If that’s not enough and you need to throw some custom exceptions you could extend CAccessControlFilter, override the parts you want to change and use this one as your filterclass

Regarding customized errors in general: