diff --git a/docs/guide/security-authorization.md b/docs/guide/security-authorization.md index 703bb0e425..b4827c90c6 100644 --- a/docs/guide/security-authorization.md +++ b/docs/guide/security-authorization.md @@ -347,7 +347,7 @@ $rule = new \app\rbac\AuthorRule; $auth->add($rule); // 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->ruleName = $rule->name; $auth->add($updateOwnPost);