Skip to content

Commit 97cc06b

Browse files
klsoft-webvjik
andauthored
Update authorization.md (#382)
Co-authored-by: Sergei Predvoditelev <sergei@predvoditelev.ru>
1 parent 9c6a988 commit 97cc06b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/guide/security/authorization.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ use Yiisoft\Rbac\ManagerInterface;
110110
use Yiisoft\Rbac\Php\ItemsStorage;
111111
use Yiisoft\Rbac\Php\AssignmentsStorage;
112112
use Yiisoft\Access\AccessCheckerInterface;
113+
use Yiisoft\User\CurrentUser;
113114

114115
return [
115116
// ...
@@ -126,6 +127,10 @@ return [
126127
]
127128
],
128129
AccessCheckerInterface::class => ManagerInterface::class,
130+
131+
CurrentUser::class => [
132+
'withAccessChecker()' => [Reference::to(AccessCheckerInterface::class)]
133+
],
129134
];
130135
```
131136

0 commit comments

Comments
 (0)