diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-09-02 17:27:25 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:27 +0200 |
commit | 5dc2c35ce5f3023ccea4cc599cf54d6b1c0e2c01 (patch) | |
tree | 70457c2a82d972ecdbe269114f34f9ec934fd5c8 /core/js/sharedialogshareelistview.js | |
parent | 60abfcdab16ed674015422a6300bd28f3baa5e91 (diff) | |
download | nextcloud-server-5dc2c35ce5f3023ccea4cc599cf54d6b1c0e2c01.tar.gz nextcloud-server-5dc2c35ce5f3023ccea4cc599cf54d6b1c0e2c01.zip |
fixed set of possible permissions for remote shares
Diffstat (limited to 'core/js/sharedialogshareelistview.js')
-rw-r--r-- | core/js/sharedialogshareelistview.js | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js index f9d725bf51e..6a356b8144c 100644 --- a/core/js/sharedialogshareelistview.js +++ b/core/js/sharedialogshareelistview.js @@ -29,9 +29,9 @@ ' {{#if mailPublicNotificationEnabled}} {{#unless isRemoteShare}}' + ' <label><input type="checkbox" name="mailNotification" class="mailNotification" {{#if wasMailSent}}checked="checked"{{/if}} />{{notifyByMailLabel}}</label>' + ' {{/unless}} {{/if}}' + - ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}}' + + ' {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isRemoteShare}}' + ' <label><input id="canShare-{{shareWith}}" type="checkbox" name="share" class="permissions" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />{{canShareLabel}}</label>' + - ' {{/if}} {{/if}}' + + ' {{/unless}} {{/if}} {{/if}}' + ' {{#if editPermissionPossible}}' + ' <label><input id="canEdit-{{shareWith}}" type="checkbox" name="edit" class="permissions" {{#if hasEditPermission}}checked="checked"{{/if}} />{{canEditLabel}}</label>' + ' {{/if}}' + @@ -44,9 +44,9 @@ ' {{#if updatePermissionPossible}}' + ' <label><input id="canUpdate-{{shareWith}}" type="checkbox" name="update" class="permissions" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>{{updatePermissionLabel}}</label>' + ' {{/if}}' + - ' {{#if deletePermissionPossible}}' + + ' {{#if deletePermissionPossible}} {{#unless isRemoteShare}}' + ' <label><input id="canDelete-{{shareWith}}" type="checkbox" name="delete" class="permissions" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>{{deletePermissionLabel}}</label>' + - ' {{/if}}' + + ' {{/unless}} {{/if}}' + ' </div>' + ' {{/unless}}' + ' </li>' + @@ -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); } |