Make Caccesscontrolfilter::message Configurable?

From time to time I am missing a feature that semi-exists already. That is the message property of CAccessControlFilter. I very often have the following situation where I send an anonymous user to access restricted page, which requires authorization. Yii handles everything for me [checks and redirects the user to login page, which is great]. I am however, missing the ability to define an error flash message as part of my rules that the user can see when he lands at the login page. The message property already exists and if only can be made a bit more flexible so it can be used as a flash message would be great! This would improve the user experience! B)

The new AccessControl design allows you to configure callbacks that are called on both allow and deny results. I think this should help you to achieve your goal.