summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorfenn-cs <fenn25.fn@gmail.com>2024-01-22 14:49:57 +0100
committerfenn-cs <fenn25.fn@gmail.com>2024-02-03 20:30:51 +0100
commit61adb716fe1efbb2fab113791b58787390902a8b (patch)
tree718bc520103977a32e041b25fc7f11c3b88f3327 /apps/files_sharing/lib
parent44c9651c1cb89c1bb1f05c2b8d126ea47f45abc5 (diff)
downloadnextcloud-server-61adb716fe1efbb2fab113791b58787390902a8b.tar.gz
nextcloud-server-61adb716fe1efbb2fab113791b58787390902a8b.zip
Consider admin defaults when creating shares
The current share logic always uses the default `BUNDLED_PERMISSIONS.ALL` which includes everything. This commit updates share creation logic to use `defaultPermissions` if set by admin for the creation of new shares. Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Listener/LoadSidebarListener.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Listener/LoadSidebarListener.php b/apps/files_sharing/lib/Listener/LoadSidebarListener.php
index b88c3ccf0d8..c271d1db71f 100644
--- a/apps/files_sharing/lib/Listener/LoadSidebarListener.php
+++ b/apps/files_sharing/lib/Listener/LoadSidebarListener.php
@@ -51,6 +51,7 @@ class LoadSidebarListener implements IEventListener {
$shareConfig = [
'allowPublicUploads' => $this->shareManager->shareApiLinkAllowPublicUpload(),
+ 'defaultPermissions' => $this->shareManager->shareApiDefaultPermissions(),
];
$this->initialState->provideInitialState('shareConfig', $shareConfig);