如何更新Yii RBAC表中的授权项?

如何更新Yii RBAC表中的授权项?,yii,Yii,我们有这样的东西,例如: $auth=Yii::app()->authManager; $auth->createOperation('createPost','create a post'); $auth->createOperation('readPost','read a post'); $bizRule='return Yii::app()->user->id==$params["post"]->authID;'; $task=$auth->

我们有这样的东西,例如:

$auth=Yii::app()->authManager;

$auth->createOperation('createPost','create a post');
$auth->createOperation('readPost','read a post');

$bizRule='return Yii::app()->user->id==$params["post"]->authID;';
$task=$auth->createTask('updateOwnPost','update a post by author himself',$bizRule);
$task->addChild('updatePost');

$role=$auth->createRole('reader');
$role->addChild('readPost');
然后我们运行,然后填充数据库。太好了

假设我发现了一些问题,需要调整代码


有没有办法以编程方式更新RBAC Yii表?

当然,没有理由不能在其他应用程序中使用程序中发布的代码places@Ali穆萨迪亚普尔,谢谢。