Skip to content

Commit 88dec7a

Browse files
markuxdmeroff
authored andcommitted
Changed AccessRule to check other roles/permissions (#746)
1 parent 9398573 commit 88dec7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

filters/AccessRule.php

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ protected function matchRole($user)
4040
if (!\Yii::$app->user->isGuest && \Yii::$app->user->identity->isAdmin) {
4141
return true;
4242
}
43+
} elseif ($user->can($role)) {
44+
return true;
4345
}
4446
}
4547

0 commit comments

Comments
 (0)