diff options
Diffstat (limited to 'apps/files/src')
-rw-r--r-- | apps/files/src/actions/moveOrCopyActionUtils.ts | 5 | ||||
-rw-r--r-- | apps/files/src/components/FileEntry.vue | 10 |
2 files changed, 8 insertions, 7 deletions
diff --git a/apps/files/src/actions/moveOrCopyActionUtils.ts b/apps/files/src/actions/moveOrCopyActionUtils.ts index 80c97fcc147..511fd32d134 100644 --- a/apps/files/src/actions/moveOrCopyActionUtils.ts +++ b/apps/files/src/actions/moveOrCopyActionUtils.ts @@ -51,7 +51,8 @@ export const canDownload = (nodes: Node[]) => { } export const canCopy = (nodes: Node[]) => { - // For now the only restriction is that a shared file - // cannot be copied if the download is disabled + // a shared file cannot be copied if the download is disabled + // it can be copied if the user has at least read permissions return canDownload(nodes) + && !nodes.some(node => node.permissions === Permission.NONE) } diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue index 103b6046f26..cfce3e924e8 100644 --- a/apps/files/src/components/FileEntry.vue +++ b/apps/files/src/components/FileEntry.vue @@ -65,7 +65,7 @@ class="files-list__row-mtime" data-cy-files-list-row-mtime @click="openDetailsIfAvailable"> - <NcDateTime :timestamp="source.mtime" :ignore-seconds="true" /> + <NcDateTime v-if="source.mtime" :timestamp="source.mtime" :ignore-seconds="true" /> </td> <!-- View columns --> @@ -177,8 +177,8 @@ export default defineComponent({ }, size() { - const size = parseInt(this.source.size, 10) || 0 - if (typeof size !== 'number' || size < 0) { + const size = parseInt(this.source.size, 10) + if (typeof size !== 'number' || isNaN(size) || size < 0) { return this.t('files', 'Pending') } return formatFileSize(size, true) @@ -186,8 +186,8 @@ export default defineComponent({ sizeOpacity() { const maxOpacitySize = 10 * 1024 * 1024 - const size = parseInt(this.source.size, 10) || 0 - if (!size || size < 0) { + const size = parseInt(this.source.size, 10) + if (!size || isNaN(size) || size < 0) { return {} } |