From aff948925a896e996304a092cfb01c48c11f6ad7 Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Mon, 28 Jul 2014 22:04:13 +0200
Subject: [PATCH] update attributes for share with user list, file should
 always have delete permissions, this means unshare in this context, and the
 overview page is always a root view

---
 apps/files_sharing/js/sharedfilelist.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js
index c060691b8b..7a43185a2d 100644
--- a/apps/files_sharing/js/sharedfilelist.js
+++ b/apps/files_sharing/js/sharedfilelist.js
@@ -59,6 +59,9 @@
 			$tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(','));
 			if (this._sharedWithUser) {
 				$tr.attr('data-share-owner', fileData.shareOwner);
+				$tr.attr('data-mounttype', 'shared-root');
+				var permission = parseInt($tr.attr('data-permissions')) | OC.PERMISSION_DELETE;
+				$tr.attr('data-permissions', permission);
 			}
 			return $tr;
 		},
-- 
GitLab