if (fileData.type === 'file') {
// files can't be shared with delete permissions
sharePermissions = sharePermissions & ~OC.PERMISSION_DELETE;
+
+ // create permissions don't mean anything for files
+ sharePermissions = sharePermissions & ~OC.PERMISSION_CREATE;
}
tr.attr('data-share-permissions', sharePermissions);
if (fileData.shareOwner) {
$tr = fileList.$el.find('tr:first');
expect(parseInt($tr.attr('data-share-permissions'), 10))
- .toEqual(OC.PERMISSION_ALL - OC.PERMISSION_SHARE - OC.PERMISSION_DELETE);
+ .toEqual(OC.PERMISSION_ALL - OC.PERMISSION_SHARE - OC.PERMISSION_DELETE - OC.PERMISSION_CREATE);
});
});
});