Skip to content

Commit

Permalink
feat: use ACL rule for edit and delete
Browse files Browse the repository at this point in the history
  • Loading branch information
tinect committed Oct 26, 2024
1 parent 23d93ea commit 2dd4516
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {

inject: [
'repositoryFactory',
'acl',
],

mixins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
:items="items"
:sort-by="sortBy"
:sort-direction="sortDirection"
:allow-edit="true"
:allow-delete="true"
:allow-edit="acl.can('tinect_redirects_redirect_request.editor')"
:allow-delete="acl.can('tinect_redirects_redirect_request.deleter')"
identifier="tinect-redirects-requests-list"
:is-loading="isLoading"
@page-change="onPageChange"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {

inject: [
'repositoryFactory',
'acl',
],

mixins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
:items="items"
:sort-by="sortBy"
:sort-direction="sortDirection"
:allow-edit="false"
:allow-delete="false"
:allow-edit="acl.can('tinect_redirects_redirect.editor')"
:allow-delete="acl.can('tinect_redirects_redirect.deleter')"
identifier="tinect-redirects-similar-list"
:is-loading="isLoading"
@page-change="onPageChange"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default {

inject: [
'repositoryFactory',
'acl',
],

mixins: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
:sort-direction="sortDirection"
:isLoading="isLoading"
:disable-data-fetching="true"
:allow-edit="true"
:allow-delete="true"
:allow-edit="acl.can('tinect_redirects_redirect.editor')"
:allow-delete="acl.can('tinect_redirects_redirect.deleter')"
identifier="tinect-redirect-list"
detail-route="tinect.redirects.details"
@update-records="updateTotal"
Expand Down

0 comments on commit 2dd4516

Please sign in to comment.