From df1fa52ee52de577397012a5aad381367f9549a4 Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Thu, 23 Jul 2020 09:30:42 +0200
Subject: Respect default share permissions

Else we'll always create new shares with the max permissions.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
---
 apps/files_sharing/src/components/SharingInput.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'apps/files_sharing/src/components/SharingInput.vue')

diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue
index 41d80cc249b..e5a32e24549 100644
--- a/apps/files_sharing/src/components/SharingInput.vue
+++ b/apps/files_sharing/src/components/SharingInput.vue
@@ -435,7 +435,7 @@ export default {
 					path,
 					shareType: value.shareType,
 					shareWith: value.shareWith,
-					permissions: this.fileInfo.sharePermissions,
+					permissions: this.fileInfo.sharePermissions & OC.getCapabilities().files_sharing.default_permissions,
 				})
 				this.$emit('add:share', share)
 
-- 
cgit v1.2.3

