Skip to content

Commit

Permalink
Merge pull request #120 from visto9259/2.2.x
Browse files Browse the repository at this point in the history
Fixed quick-start.md in both current and 2.0 versions
  • Loading branch information
visto9259 authored Jan 4, 2025
2 parents 35ba914 + 4b9971f commit 2b64d85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Let's modify the `lmcrbac.config.php` file as follows:
return [
'lmc_rbac' => [
'role_provider' => [
/* roles and permissions
/* roles and permissions */
],
'assertion_map' => [
'edit' => function ($permission, IdentityInterface $identity = null, $resource = null) {
Expand Down
13 changes: 7 additions & 6 deletions docs/versioned_docs/version-2.0/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,16 @@ Let's modify the `lmcrbac.config.php` file as follows:
return [
'lmc_rbac' => [
'role_provider' => [
/* roles and permissions
/* roles and permissions */
],
'assertion_map' => [
'edit' => function ($permission, IdentityInterface $identity = null, $resource = null) {
if ($resource->getOwnerId() === $identity->getId() {
return true;
} else {
return false;
}
if ($resource->getOwnerId() === $identity->getId()) {
return true;
} else {
return false;
}
},
],
],
];
Expand Down

0 comments on commit 2b64d85

Please sign in to comment.