From d6771502f21349d5393158eda6d2d16569fd60c3 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 17 Sep 2013 18:11:43 +0200 Subject: check only permission from link-share to decide if public upload is enabled or disabled --- core/js/share.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index 5d34faf8a5d..250f410072c 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -177,7 +177,9 @@ OC.Share={ if (allowPublicUploadStatus) { return true; } - allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false; + if (value.share_type === OC.Share.SHARE_TYPE_LINK) { + allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false; + } }); html += ''; -- cgit v1.2.3 From 642b064c5b98990f6ac0e3ba344db8cd1fe4d1f8 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 17 Sep 2013 18:18:23 +0200 Subject: we can leave the loop if the permission of the link share was checked --- core/js/share.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core/js/share.js') diff --git a/core/js/share.js b/core/js/share.js index 250f410072c..641252a4d78 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -174,11 +174,9 @@ OC.Share={ var allowPublicUploadStatus = false; $.each(data.shares, function(key, value) { - if (allowPublicUploadStatus) { - return true; - } if (value.share_type === OC.Share.SHARE_TYPE_LINK) { allowPublicUploadStatus = (value.permissions & OC.PERMISSION_CREATE) ? true : false; + return true; } }); -- cgit v1.2.3