Commit 8ac8d487 by Qiang Xue

Fixes #3128: Fixed the bug that `defaultRoles` set in RBAC manager was not working as specified

parent 8ca7fa8d
...@@ -6,6 +6,7 @@ Yii Framework 2 Change Log ...@@ -6,6 +6,7 @@ Yii Framework 2 Change Log
- Bug #3066: `yii\db\mssql\Schema::getTableSchema()` should return null when the table does not exist (qiangxue) - Bug #3066: `yii\db\mssql\Schema::getTableSchema()` should return null when the table does not exist (qiangxue)
- Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue) - Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue)
- Bug #3128: Fixed the bug that `defaultRoles` set in RBAC manager was not working as specified (qiangxue)
- Enh #3103: debugger panel is now not displayed when printing a page (githubjeka) - Enh #3103: debugger panel is now not displayed when printing a page (githubjeka)
- Enh #3108: Added `yii\debug\Module::enableDebugLogs` to disable logging debug logs by default (qiangxue) - Enh #3108: Added `yii\debug\Module::enableDebugLogs` to disable logging debug logs by default (qiangxue)
- Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue) - Enh: Added support for using sub-queries when building a DB query with `IN` condition (qiangxue)
......
...@@ -104,7 +104,7 @@ class DbManager extends BaseManager ...@@ -104,7 +104,7 @@ class DbManager extends BaseManager
return false; return false;
} }
if (isset($this->defaultRoles[$itemName]) || isset($assignments[$itemName])) { if (isset($assignments[$itemName]) || in_array($itemName, $this->defaultRoles)) {
return true; return true;
} }
......
...@@ -117,7 +117,7 @@ class PhpManager extends BaseManager ...@@ -117,7 +117,7 @@ class PhpManager extends BaseManager
return false; return false;
} }
if (isset($this->defaultRoles[$itemName]) || isset($assignments[$itemName])) { if (isset($assignments[$itemName]) || in_array($itemName, $this->defaultRoles)) {
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment