fix(editor): Replace isInstanceOwner checks with scopes where applicable (#7858)

Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
Csaba Tuncsik
2023-12-04 10:02:54 +01:00
committed by GitHub
parent 39fa8d21bb
commit 132d691cbf
21 changed files with 111 additions and 67 deletions

View File

@@ -25,7 +25,7 @@
<el-switch
class="mr-s"
:disabled="!isInstanceOwner"
:disabled="readonly"
:modelValue="nodeParameters.enabled"
@update:modelValue="onEnabledSwitched($event, destination.id)"
:title="
@@ -84,7 +84,7 @@ export default defineComponent({
required: true,
default: deepCopy(defaultMessageEventBusDestinationOptions),
},
isInstanceOwner: Boolean,
readonly: Boolean,
},
mounted() {
this.nodeParameters = Object.assign(
@@ -105,7 +105,7 @@ export default defineComponent({
value: DESTINATION_LIST_ITEM_ACTIONS.OPEN,
},
];
if (this.isInstanceOwner) {
if (!this.readonly) {
actions.push({
label: this.$locale.baseText('workflows.item.delete'),
value: DESTINATION_LIST_ITEM_ACTIONS.DELETE,