mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Update security-authorization.md
This commit is contained in:
@ -646,7 +646,11 @@ class UserGroupRule extends Rule
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
然后按 [in the previous section](#generating-rbac-data) 中的说明创建自己的 command/migration:
|
||||
|
||||
```php
|
||||
$auth = Yii::$app->authManager;
|
||||
|
||||
$rule = new \app\rbac\UserGroupRule;
|
||||
|
||||
Reference in New Issue
Block a user