diff --git a/changelog/unreleased/bugfix-tags-not-editable-locked-files b/changelog/unreleased/bugfix-tags-not-editable-locked-files new file mode 100644 index 00000000000..7cec7562d98 --- /dev/null +++ b/changelog/unreleased/bugfix-tags-not-editable-locked-files @@ -0,0 +1,6 @@ +Bugfix: Tags are no longer editable for a locked file + +Tags are no longer editable for files that are currently locked. + +https://github.com/owncloud/web/pull/9873 +https://github.com/owncloud/web/issues/9789 diff --git a/packages/web-app-files/src/components/SideBar/TagsPanel.vue b/packages/web-app-files/src/components/SideBar/TagsPanel.vue index 504bc8ab822..258320a2957 100644 --- a/packages/web-app-files/src/components/SideBar/TagsPanel.vue +++ b/packages/web-app-files/src/components/SideBar/TagsPanel.vue @@ -8,6 +8,7 @@ v-model="selectedTags" class="oc-mb-s" :multiple="true" + :disabled="readonly" :options="availableTags" :contextual-helper="contextualHelper" taggable @@ -85,6 +86,7 @@ export default defineComponent({ const injectedResource = inject('resource') const resource = computed(() => unref(injectedResource)) + const readonly = computed(() => unref(resource).locked === true) const selectedTags = ref([]) const availableTags = ref([]) let allTags: string[] = [] @@ -230,7 +232,8 @@ export default defineComponent({ save, keycode, keydownMethods, - contextualHelper + contextualHelper, + readonly } } }) diff --git a/packages/web-pkg/src/composables/actions/files/useFileActionsShowEditTags.ts b/packages/web-pkg/src/composables/actions/files/useFileActionsShowEditTags.ts index 5832d431c30..00440a500d8 100644 --- a/packages/web-pkg/src/composables/actions/files/useFileActionsShowEditTags.ts +++ b/packages/web-pkg/src/composables/actions/files/useFileActionsShowEditTags.ts @@ -34,6 +34,10 @@ export const useFileActionsShowEditTags = ({ store }: { store?: Store } = { return false } + if (resources[0].locked === true) { + return false + } + if ( isLocationTrashActive(router, 'files-trash-generic') || isLocationPublicActive(router, 'files-public-link')