diff --git a/apps/files_sharing/lib/Listener/LoadSidebarListener.php b/apps/files_sharing/lib/Listener/LoadSidebarListener.php index b88c3ccf0d8ba..c271d1db71fd9 100644 --- a/apps/files_sharing/lib/Listener/LoadSidebarListener.php +++ b/apps/files_sharing/lib/Listener/LoadSidebarListener.php @@ -51,6 +51,7 @@ public function handle(Event $event): void { $shareConfig = [ 'allowPublicUploads' => $this->shareManager->shareApiLinkAllowPublicUpload(), + 'defaultPermissions' => $this->shareManager->shareApiDefaultPermissions(), ]; $this->initialState->provideInitialState('shareConfig', $shareConfig); diff --git a/apps/files_sharing/src/services/ConfigService.js b/apps/files_sharing/src/services/ConfigService.js index d1d99e7be7a5c..8afa41e80e5c3 100644 --- a/apps/files_sharing/src/services/ConfigService.js +++ b/apps/files_sharing/src/services/ConfigService.js @@ -31,6 +31,17 @@ export default class Config { this._shareConfig = loadState('files_sharing', 'shareConfig', {}) } + /** + * Get default share permissions, if any + * + * @return {boolean} + * @readonly + * @memberof Config + */ + get defaultPermissions() { + return this._shareConfig.defaultPermissions + } + /** * Is public upload allowed on link shares ? * diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index 8c0bb32f84d18..8027faa6d6d31 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -16,8 +16,7 @@
-
+