aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2023-07-10 22:34:37 +0100
committerGitHub <noreply@github.com>2023-07-10 22:34:37 +0100
commitc2af1493e2cfbaaea7337b92987501a69fe8c111 (patch)
treecd2abcc54e489afdb7be3d8504d55794346def65 /apps
parent70e2243f0f8287121454eeb67389654ac8e11b04 (diff)
parente7d543278297fd8b119f768e0d7a6d2fe48b7c88 (diff)
downloadnextcloud-server-c2af1493e2cfbaaea7337b92987501a69fe8c111.tar.gz
nextcloud-server-c2af1493e2cfbaaea7337b92987501a69fe8c111.zip
Merge pull request #39265 from nextcloud/artonge/backport/stable27/39165
[stable27] Enable all files_versions features when groupfolders is enabled
Diffstat (limited to 'apps')
-rw-r--r--apps/files_versions/lib/Capabilities.php6
-rw-r--r--apps/files_versions/src/components/Version.vue14
2 files changed, 14 insertions, 6 deletions
diff --git a/apps/files_versions/lib/Capabilities.php b/apps/files_versions/lib/Capabilities.php
index afc6fa39da7..411a47f6c4a 100644
--- a/apps/files_versions/lib/Capabilities.php
+++ b/apps/files_versions/lib/Capabilities.php
@@ -46,13 +46,11 @@ class Capabilities implements ICapability {
* @return array
*/
public function getCapabilities() {
- $groupFolderInstalled = $this->appManager->isInstalled('groupfolders');
-
return [
'files' => [
'versioning' => true,
- 'version_labeling' => !$groupFolderInstalled && $this->config->getSystemValueBool('enable_version_labeling', true),
- 'version_deletion' => !$groupFolderInstalled && $this->config->getSystemValueBool('enable_version_deletion', true),
+ 'version_labeling' => $this->config->getSystemValueBool('enable_version_labeling', true),
+ 'version_deletion' => $this->config->getSystemValueBool('enable_version_deletion', true),
]
];
}
diff --git a/apps/files_versions/src/components/Version.vue b/apps/files_versions/src/components/Version.vue
index a801c6beac8..93dfb95b8b7 100644
--- a/apps/files_versions/src/components/Version.vue
+++ b/apps/files_versions/src/components/Version.vue
@@ -46,7 +46,7 @@
</div>
</template>
<template #actions>
- <NcActionButton v-if="capabilities.files.version_labeling === true"
+ <NcActionButton v-if="enableLabeling"
:close-after-click="true"
@click="openVersionLabelModal">
<template #icon>
@@ -70,7 +70,7 @@
</template>
{{ t('files_versions', 'Download version') }}
</NcActionLink>
- <NcActionButton v-if="!isCurrent && capabilities.files.version_deletion === true"
+ <NcActionButton v-if="!isCurrent && enableDeletion"
:close-after-click="true"
@click="deleteVersion">
<template #icon>
@@ -244,6 +244,16 @@ export default {
formattedDate() {
return moment(this.version.mtime).format('LLL')
},
+
+ /** @return {boolean} */
+ enableLabeling() {
+ return this.capabilities.files.version_labeling === true && this.fileInfo.mountType !== 'group'
+ },
+
+ /** @return {boolean} */
+ enableDeletion() {
+ return this.capabilities.files.version_deletion === true && this.fileInfo.mountType !== 'group'
+ }
},
methods: {
openVersionLabelModal() {