I think it would add useful flexibility if we could set the criterias for defaultRoles in the config file.
eg
if we provide a config like this
'authManager'=>array(
'class'=>'CDbAuthManager',
'connectionID'=>'db',
'defaultRoles'=>array(
'authenticated'=>array(
'bizRule'=>'!Yii::app()->user->isGuest',
...
),
'guest'=>array(
'bizRule'=>'Yii::app()->user->isGuest',
...
),
),
),
then the function checkDefaultRoles won’t make a trip to the db, but instead just use the data in the array for each role to check it.
but if the config is specified like
'authManager'=>array(
'class'=>'CDbAuthManager',
'connectionID'=>'db',
'defaultRoles'=>array('authenticated','guest'),
),
the criteria will be checked from the db.
This will help people who plan to use the CDbAuthManager but just need basic roles atm.