瀏覽代碼

Fix federated link sharing permissions

If a link share has read permissions it may have too share permissions
(depending on whether federated shares are allowed or not). Therefore
the share permission needs to be ignored when checking the permissions
to determine the public upload status.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Daniel Calviño Sánchez 3 年之前
父節點
當前提交
31d2d04c01
共有 3 個文件被更改,包括 3 次插入1 次删除
  1. 0 0
      core/js/dist/share_backend.js
  2. 0 0
      core/js/dist/share_backend.js.map
  3. 3 1
      core/js/sharedialoglinkshareview.js

文件差異過大導致無法顯示
+ 0 - 0
core/js/dist/share_backend.js


文件差異過大導致無法顯示
+ 0 - 0
core/js/dist/share_backend.js.map


+ 3 - 1
core/js/sharedialoglinkshareview.js

@@ -882,7 +882,9 @@
 			var publicUploadRChecked = '';
 			var publicUploadWChecked = '';
 
-			switch (this.model.linkSharePermissions(share.id)) {
+			// Public upload status is independent of the share permission,
+			// which is used for federated shares.
+			switch (this.model.linkSharePermissions(share.id) & ~OC.PERMISSION_SHARE) {
 				case OC.PERMISSION_READ:
 					publicUploadRChecked = 'checked';
 					break;

部分文件因文件數量過多而無法顯示