fix: hide 'Move to top level' option in cloud workspaces

Cloud connections/queries must always be in a folder. The option
was silently moving items to the owner's personal folder when null
folder_id was submitted. Hidden in the UI; backend now rejects null
folder_id for workspace records.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthew Rathbone
2026-03-05 10:39:12 -06:00
parent 15001db415
commit bbafe25fef
2 changed files with 4 additions and 3 deletions

View File

@@ -203,7 +203,7 @@ export default {
if (this.isCloud || this.foldersSupported) {
options.push({ type: 'divider' })
if (this.config.connectionFolderId) {
if (!this.isCloud && this.config.connectionFolderId) {
options.push({ name: 'Move to top level', handler: () => this.moveToRoot() })
}
options.push(...this.moveToOptions)

View File

@@ -22,7 +22,7 @@
import _ from 'lodash'
import { IQueryFolder } from '@/common/interfaces/IQueryFolder'
import Vue from 'vue'
import { mapState } from 'vuex'
import { mapState, mapGetters } from 'vuex'
import TimeAgo from 'javascript-time-ago'
export default Vue.extend({
@@ -31,6 +31,7 @@ export default Vue.extend({
timeAgo: new TimeAgo('en-US')
}),
computed: {
...mapGetters(['isCloud']),
...mapState('data/queryFolders', {'folders': 'items', 'foldersUnsupported': 'unsupported'}),
foldersSupported() {
return !this.foldersUnsupported
@@ -121,7 +122,7 @@ export default Vue.extend({
]
if (this.foldersSupported || this.folders.length > 0) {
options.push({ type: 'divider' })
if (this.item.queryFolderId) {
if (!this.isCloud && this.item.queryFolderId) {
options.push({ name: 'Move to top level', handler: ({ item }) => this.moveToRoot(item) })
}
options.push(...this.moveToOptions)