mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-23 18:18:21 +08:00
Merge pull request #5490 from MihailDev/patch-1
Update security-authorization.md
This commit is contained in:
@@ -347,7 +347,7 @@ $rule = new \app\rbac\AuthorRule;
|
|||||||
$auth->add($rule);
|
$auth->add($rule);
|
||||||
|
|
||||||
// add the "updateOwnPost" permission and associate the rule with it.
|
// add the "updateOwnPost" permission and associate the rule with it.
|
||||||
$updateOwnPost = $this->auth->createPermission('updateOwnPost');
|
$updateOwnPost = $auth->createPermission('updateOwnPost');
|
||||||
$updateOwnPost->description = 'Update own post';
|
$updateOwnPost->description = 'Update own post';
|
||||||
$updateOwnPost->ruleName = $rule->name;
|
$updateOwnPost->ruleName = $rule->name;
|
||||||
$auth->add($updateOwnPost);
|
$auth->add($updateOwnPost);
|
||||||
|
|||||||
Reference in New Issue
Block a user