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