diff --git a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue index 8b62bc8f89..6e3c974221 100644 --- a/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue +++ b/packages/nc-gui/components/dashboard/TreeView/Table/Node.vue @@ -432,6 +432,24 @@ async function onRename() { onCancel() } + +const enabledOptions = computed(() => { + return { + tableRename: isUIAllowed('tableRename', { roles: baseRole?.value, source: source.value }), + tableDescriptionEdit: isUIAllowed('tableDescriptionEdit', { roles: baseRole?.value, source: source.value }), + tableDuplicate: + isUIAllowed('tableDuplicate', { + source: source.value, + }) && + (source.value?.is_meta || source.value?.is_local), + tablePermission: + isTableAndFieldPermissionsEnabled.value && + isEeUI && + table.value?.type === 'table' && + isUIAllowed('tablePermission', { roles: baseRole?.value, source: source.value }), + tableDelete: isUIAllowed('tableDelete', { roles: baseRole?.value, source: source.value }), + } +}) @@ -572,32 +590,18 @@ async function onRename() { " /> - - - - - {{ $t('labels.editTableDescription') }} - - - - + @@ -626,26 +625,18 @@ async function onRename() { - {{ $t('labels.editTableDescription') }} @@ -682,6 +673,8 @@ async function onRename() { + + @@ -696,7 +689,6 @@ async function onRename() {