diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index f9d725bf51..6a356b8144 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -29,9 +29,9 @@ ' {{#if mailPublicNotificationEnabled}} {{#unless isRemoteShare}}' + ' ' + ' {{/unless}} {{/if}}' + - ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}}' + + ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' + ' ' + - ' {{/if}} {{/if}}' + + ' {{/unless}} {{/if}} {{/if}}' + ' {{#if editPermissionPossible}}' + ' ' + ' {{/if}}' + @@ -44,9 +44,9 @@ ' {{#if updatePermissionPossible}}' + ' ' + ' {{/if}}' + - ' {{#if deletePermissionPossible}}' + + ' {{#if deletePermissionPossible}} {{#unless isRemoteShare}}' + ' ' + - ' {{/if}}' + + ' {{/unless}} {{/if}}' + ' ' + ' {{/unless}}' + ' ' + @@ -121,13 +121,18 @@ var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex); var shareType = this.model.getShareType(shareIndex); + var hasPermissionOverride = {}; if (shareType === OC.Share.SHARE_TYPE_GROUP) { shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'group') + ')'; } else if (shareType === OC.Share.SHARE_TYPE_REMOTE) { shareWithDisplayName = shareWithDisplayName + " (" + t('core', 'remote') + ')'; + hasPermissionOverride = { + createPermissionPossible: true, + updatePermissionPossible: true + }; } - return { + return _.extend(hasPermissionOverride, { hasSharePermission: this.model.hasSharePermission(shareIndex), hasEditPermission: this.model.hasEditPermission(shareIndex), hasCreatePermission: this.model.hasCreatePermission(shareIndex), @@ -139,7 +144,7 @@ shareType: shareType, modSeed: shareType !== OC.Share.SHARE_TYPE_USER, isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE - }; + }); }, getShareeList: function() { @@ -180,7 +185,7 @@ if(this.model.isCollection(index)) { this.processCollectionShare(index); } else { - list.push(_.extend(this.getShareeObject(index), universal)) + list.push(_.extend(universal, this.getShareeObject(index))) } list = _.union(_.values(this._collections), list); } diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js index 8afc495490..acaa890be1 100644 --- a/core/js/shareitemmodel.js +++ b/core/js/shareitemmodel.js @@ -253,6 +253,12 @@ if(!_.isObject(share)) { throw "Unknown Share"; } + if( share.share_type === OC.Share.SHARE_TYPE_REMOTE + && ( permission === OC.PERMISSION_SHARE + || permission === OC.PERMISSION_DELETE)) + { + return false; + } return (share.permissions & permission) === permission; },