mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #11230: Include defaultRoles
in yii\rbac\DbManager->getRolesByUser()
results
This commit is contained in:

committed by
Alexander Makarov

parent
7db178d8bb
commit
3a4505ac08
@ -392,7 +392,7 @@ class PhpManager extends BaseManager
|
||||
*/
|
||||
public function getRolesByUser($userId)
|
||||
{
|
||||
$roles = [];
|
||||
$roles = $this->getDefaultRoles();
|
||||
foreach ($this->getAssignments($userId) as $name => $assignment) {
|
||||
$role = $this->items[$assignment->roleName];
|
||||
if ($role->type === Item::TYPE_ROLE) {
|
||||
|
Reference in New Issue
Block a user