summaryrefslogtreecommitdiffstats
path: root/core/js/sharedialogshareelistview.js
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-30 14:22:33 +0100
committerJulius Härtl <jus@bitgrid.net>2018-11-02 12:09:29 +0100
commitb73e03724c402216ccadb0dab1973f1ddaa14494 (patch)
tree1f800496784d488d526561bb8897aa913889fbaf /core/js/sharedialogshareelistview.js
parent275cea5d9ceee3236b28df8bda0ba520ffe38db5 (diff)
downloadnextcloud-server-b73e03724c402216ccadb0dab1973f1ddaa14494.tar.gz
nextcloud-server-b73e03724c402216ccadb0dab1973f1ddaa14494.zip
Show share settings for owner and reshare owners only
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/js/sharedialogshareelistview.js')
-rw-r--r--core/js/sharedialogshareelistview.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index 8b709f0d74d..dc97099dd58 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -86,6 +86,7 @@
var shareType = this.model.getShareType(shareIndex);
var sharedBy = this.model.getSharedBy(shareIndex);
var sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex);
+ var fileOwnerUid = this.model.getFileOwnerUid(shareIndex);
var hasPermissionOverride = {};
if (shareType === OC.Share.SHARE_TYPE_GROUP) {
@@ -143,6 +144,8 @@
hasCreatePermission: this.model.hasCreatePermission(shareIndex),
hasUpdatePermission: this.model.hasUpdatePermission(shareIndex),
hasDeletePermission: this.model.hasDeletePermission(shareIndex),
+ sharedBy: sharedBy,
+ sharedByDisplayName: sharedByDisplayName,
shareWith: shareWith,
shareWithDisplayName: shareWithDisplayName,
shareWithAvatar: shareWithAvatar,
@@ -150,6 +153,8 @@
shareType: shareType,
shareId: this.model.get('shares')[shareIndex].id,
modSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM),
+ owner: fileOwnerUid,
+ canUpdateShareSettings: (sharedBy === oc_current_user || fileOwnerUid === oc_current_user),
isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,
isRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP,
isNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP,