Allow setting can edit permissions on federated shares in webUI

Fixes #24032

Since we have a slightly different UI for the federated shares our
normal logic fails us. This makes sure to add the correct permissions
when it is a federated share.
This commit is contained in:
Roeland Jago Douma 2016-04-20 08:21:21 +02:00
parent bd19bbb926
commit 466b7dc05f
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 11 additions and 0 deletions

View File

@ -280,6 +280,17 @@
permissions |= $(checkbox).data('permissions');
});
// The federated share UI is a bit different so handle it properly
if (shareType === OC.Share.SHARE_TYPE_REMOTE &&
$element.attr('name') === 'edit' &&
$element.is(':checked')) {
permissions |= OC.PERMISSION_UPDATE;
if (this.model.deletePermissionPossible()) {
permissions |= OC.PERMISSION_CREATE;
}
}
this.model.updateShare(shareId, {permissions: permissions});
},