yii2: AccessControl does not redirect login
Hello,
I just updated to 2.0.7, and it seems something wrong with user handling. After the session expiry, it does not redirect to the login screen.
Controller (it should not match to guests, according to the documentation):
class DefaultController extends BaseController
{
/**
* @inheritdoc
*/
public function behaviors()
{
return [
'access' => [
'class' => \yii\filters\AccessControl::className(),
'rules' => [
[
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [
'class' => \yii\filters\VerbFilter::className(),
'actions' => [
],
],
];
}
}
It works well with 2.0.6.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (8 by maintainers)
No, it did not. It’s like that from the very beginning of Yii 2: https://github.com/yiisoft/yii2/blob/master/framework/base/Controller.php#L245