From 673c629b5bf55fabebdfd96743ff9b27f0f74f4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 12 Nov 2019 10:32:28 +0000 Subject: [PATCH 01/13] add dutch language files --- customize.dist/messages.js | 1 + customize.dist/translations/messages.nl.js | 13 +++++++++++++ www/common/translations/messages.nl.json | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 customize.dist/translations/messages.nl.js create mode 100644 www/common/translations/messages.nl.json diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 50a1db384..9481d6195 100755 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -14,6 +14,7 @@ var map = { 'ru': 'Русский', //'te': 'తెలుగు', 'zh': '繁體中文', + 'nl': 'Nederlands' }; var messages = {}; diff --git a/customize.dist/translations/messages.nl.js b/customize.dist/translations/messages.nl.js new file mode 100644 index 000000000..238fe0c90 --- /dev/null +++ b/customize.dist/translations/messages.nl.js @@ -0,0 +1,13 @@ +/* + * You can override the translation text using this file. + * The recommended method is to make a copy of this file (/customize.dist/translations/messages.{LANG}.js) + in a 'customize' directory (/customize/translations/messages.{LANG}.js). + * If you want to check all the existing translation keys, you can open the internal language file + but you should not change it directly (/common/translations/messages.{LANG}.js) +*/ +define(['/common/translations/messages.nl.js'], function (Messages) { + // Replace the existing keys in your copied file here: + // Messages.button_newpad = "New Rich Text Document"; + + return Messages; +}); \ No newline at end of file diff --git a/www/common/translations/messages.nl.json b/www/common/translations/messages.nl.json new file mode 100644 index 000000000..7a73a41bf --- /dev/null +++ b/www/common/translations/messages.nl.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file From 4abef31a9cee8c99d757b5bc2e9970396471a57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Tue, 12 Nov 2019 10:36:35 +0000 Subject: [PATCH 02/13] de-activate dutch awaiting translation --- customize.dist/messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customize.dist/messages.js b/customize.dist/messages.js index 9481d6195..829cc4f23 100755 --- a/customize.dist/messages.js +++ b/customize.dist/messages.js @@ -14,7 +14,7 @@ var map = { 'ru': 'Русский', //'te': 'తెలుగు', 'zh': '繁體中文', - 'nl': 'Nederlands' + //'nl': 'Nederlands' }; var messages = {}; From a3bb56f3dbc26f17a341d24fe0ea76776df78d45 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 16:00:20 +0100 Subject: [PATCH 03/13] Fix tooltips in drive list mode --- www/common/drive-ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 7ac40a86f..09242affb 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1917,7 +1917,9 @@ define([ var $files = $('', { 'class': 'cp-app-drive-element-files cp-app-drive-element-list' }).text(files); - $span.attr('title', key); + if (getViewMode() === 'grid') { + $span.attr('title', key); + } $span.append($name).append($state).append($subfolders).append($files); }; From bfd46fb570170c5ab43aaf2f8ad3659728d58ae5 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 16:45:06 +0100 Subject: [PATCH 04/13] Destroy team rpc when demoted to viewer --- www/common/outer/team.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/www/common/outer/team.js b/www/common/outer/team.js index 151dff6c9..b1be2baea 100644 --- a/www/common/outer/team.js +++ b/www/common/outer/team.js @@ -1035,6 +1035,10 @@ define([ team.userObject.setReadOnly(!secret.keys.secondaryKey, secret.keys.secondaryKey); } + if (!secret.keys.secondaryKey && team.rpc) { + team.rpc.destroy(); + } + // Upgrade the shared folders var folders = Util.find(team, ['proxy', 'drive', 'sharedFolders']); Object.keys(folders || {}).forEach(function (sfId) { From 80f5ebc0ccc87a5e23e928b34708f4655334e52e Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:08:29 +0100 Subject: [PATCH 05/13] Fix shared folders not removed from memory in inner --- www/drive/inner.js | 17 +++++++++++++++++ www/teams/inner.js | 10 ++++++++++ 2 files changed, 27 insertions(+) diff --git a/www/drive/inner.js b/www/drive/inner.js index 252ed68dc..1dabf358a 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -58,6 +58,14 @@ define([ APP.newSharedFolder = null; } } + if (newObj && newObj.deprecated) { + delete folders[fId]; + delete drive.sharedFolders[fId]; + if (manager && manager.folders) { + delete manager.folders[fId]; + } + return; + } folders[fId] = folders[fId] || {}; copyObjectValue(folders[fId], newObj); folders[fId].readOnly = !secret.keys.secondaryKey; @@ -69,6 +77,15 @@ define([ manager.folders[fId].userObject.setReadOnly(readOnly, secret.keys.secondaryKey); })); }); + oldIds.forEach(function (fId) { + if (!drive.sharedFolders[fId]) { + delete folders[fId]; + delete drive.sharedFolders[fId]; + if (manager && manager.folders) { + delete manager.folders[fId]; + } + } + }); }).nThen(function () { cb(); }); diff --git a/www/teams/inner.js b/www/teams/inner.js index 98bd1a70a..54e1070a9 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -80,6 +80,16 @@ define([ manager.folders[fId].userObject.setReadOnly(readOnly, secret.keys.secondaryKey); })); }); + // Remove from memory folders that have been deleted from the drive remotely + oldIds.forEach(function (fId) { + if (!drive.sharedFolders[fId]) { + delete folders[fId]; + delete drive.sharedFolders[fId]; + if (manager && manager.folders) { + delete manager.folders[fId]; + } + } + }); }).nThen(function () { cb(); }); From 2e182788ec8502257415ac6ccb460ac942229481 Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:18:22 +0100 Subject: [PATCH 06/13] Hide drive info box when in read-only mode + update UI --- www/common/drive-ui.js | 9 ++++----- www/drive/inner.html | 2 +- www/drive/inner.js | 2 +- www/teams/inner.js | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 09242affb..dc4c8c1ab 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -534,7 +534,7 @@ define([ APP.hideDuplicateOwned = Util.find(priv, ['settings', 'drive', 'hideDuplicate']); APP.closed = false; - var $readOnly = $('#cp-app-drive-edition-state'); + var $readOnly = $(h('div#cp-app-drive-edition-state.cp-app-drive-content-info-box', Messages.readonly)); var updateObject = driveConfig.updateObject; var updateSharedFolders = driveConfig.updateSharedFolders; @@ -2169,6 +2169,7 @@ define([ var createInfoBox = function (path) { + if (APP.readOnly || $content.data('readOnlyFolder')) { return; } var $box = $('
', {'class': 'cp-app-drive-content-info-box'}); var msg; switch (path[0]) { @@ -3362,13 +3363,11 @@ define([ var readOnlyFolder = false; if (APP.readOnly) { // Read-only drive (team?) - $readOnly.show(); + $content.prepend($readOnly.clone()); } else if (folders[sfId] && folders[sfId].readOnly) { // If readonly shared folder... - $readOnly.show(); + $content.prepend($readOnly.clone()); readOnlyFolder = true; - } else { - $readOnly.hide(); } $content.data('readOnlyFolder', readOnlyFolder); diff --git a/www/drive/inner.html b/www/drive/inner.html index abbb03414..b53b1a90e 100644 --- a/www/drive/inner.html +++ b/www/drive/inner.html @@ -17,7 +17,7 @@
- +
diff --git a/www/drive/inner.js b/www/drive/inner.js index 1dabf358a..e2415d2d0 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -77,6 +77,7 @@ define([ manager.folders[fId].userObject.setReadOnly(readOnly, secret.keys.secondaryKey); })); }); + // Remove from memory folders that have been deleted from the drive remotely oldIds.forEach(function (fId) { if (!drive.sharedFolders[fId]) { delete folders[fId]; @@ -134,7 +135,6 @@ define([ SFCommon.create(waitFor(function (c) { common = c; })); }).nThen(function (waitFor) { $('#cp-app-drive-connection-state').text(Messages.disconnected); - $('#cp-app-drive-edition-state').text(Messages.readonly); var privReady = Util.once(waitFor()); var metadataMgr = common.getMetadataMgr(); if (JSON.stringify(metadataMgr.getPrivateData()) !== '{}') { diff --git a/www/teams/inner.js b/www/teams/inner.js index 54e1070a9..f571d5c84 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -485,7 +485,6 @@ define([ h('div#cp-app-drive-content-container', [ h('div#cp-app-drive-toolbar'), h('div#cp-app-drive-connection-state', {style: "display: none;"}, Messages.disconnected), - h('div#cp-app-drive-edition-state', {style: "display: none;"}, Messages.readonly), h('div#cp-app-drive-content', {tabindex:2}) ]) ]) From b5a58e3e0b1b54c02dacf7983448bd75dc52298a Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:38:00 +0100 Subject: [PATCH 07/13] Don't deprecate read-only shared folders --- www/common/outer/userObject.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/common/outer/userObject.js b/www/common/outer/userObject.js index 6ba0cd6d2..868e623de 100644 --- a/www/common/outer/userObject.js +++ b/www/common/outer/userObject.js @@ -113,9 +113,13 @@ define([ }; exp.deprecateSharedFolder = function (id) { + if (readOnly) { return; } var data = files[SHARED_FOLDERS][id]; if (!data) { return; } - files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data)); + var ro = !data.href || exp.cryptor.decrypt(data.href).indexOf('#') === -1; + if (!ro) { + files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data)); + } var paths = exp.findFile(Number(id)); exp.delete(paths, null, true); delete files[SHARED_FOLDERS][id]; From 295ff98854229fc29c60853625ad0568fa906b3d Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:59:50 +0100 Subject: [PATCH 08/13] More reliable way to detect read-only team --- www/common/drive-ui.js | 2 +- www/teams/inner.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index dc4c8c1ab..b0add7044 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -3364,7 +3364,7 @@ define([ if (APP.readOnly) { // Read-only drive (team?) $content.prepend($readOnly.clone()); - } else if (folders[sfId] && folders[sfId].readOnly) { + } else if (sfId && folders[sfId] && folders[sfId].readOnly) { // If readonly shared folder... $content.prepend($readOnly.clone()); readOnlyFolder = true; diff --git a/www/teams/inner.js b/www/teams/inner.js index f571d5c84..23c333891 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -297,7 +297,7 @@ define([ // Provide secondaryKey var teamData = (privateData.teams || {})[id] || {}; - driveAPP.readOnly = !teamData.secondaryKey; + driveAPP.readOnly = !teamData.hasSecondaryKey; var drive = DriveUI.create(common, { proxy: proxy, folders: folders, From 3b031593853c6907b7c670b142133b04329840e5 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 13 Nov 2019 13:12:06 +0000 Subject: [PATCH 09/13] Translated using Weblate (German) Currently translated at 100.0% (1148 of 1148 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ --- www/common/translations/messages.de.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index 1ba5c1c03..9c2c67ab1 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1233,5 +1233,14 @@ "driveOfflineError": "Die Verbindung zu CryptPad ist verloren gegangen. Änderungen an diesem Pad werden nicht in deinem CryptDrive gespeichert. Bitte schließe alle CryptPad-Tabs und versuche es in einem neuen Fenster erneut. ", "storageStatus": "Speicher:
{0} von {1} belegt", "teams_table": "Rollen", - "teams_table_generic": "Rollen und Berechtigungen" + "teams_table_generic": "Rollen und Berechtigungen", + "teams_table_generic_view": "Ansehen: Zugriff auf Ordner und Pads (nur Lesen)", + "teams_table_generic_edit": "Bearbeiten: Erstellen, Ändern und Löschen von Ordnern und Pads", + "teams_table_generic_admin": "Mitglieder verwalten: Einladen und Entfernen von Mitgliedern, Ändern von Benutzerrollen bis maximal Admin", + "teams_table_generic_own": "Team verwalten: Ändern von Namen und Avatar des Teams, Hinzufügen oder Entfernen von Eigentümerschaften des Teams, Löschung des Teams", + "teams_table_specific": "Ausnahmen", + "teams_table_specificHint": "Dies sind ältere geteilte Ordner, wo Benutzer noch Bearbeitungsrechte haben. Für hier erstellte oder hierhin kopierte Pads gelten Standard-Berechtigungen.", + "teams_table_admins": "Mitglieder verwalten", + "teams_table_owners": "Team verwalten", + "teams_table_role": "Rolle" } From 4a5caabd2d24d8750c27e76700ccb6621389153d Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Nov 2019 14:13:57 +0100 Subject: [PATCH 10/13] Fix 'Invited' members in team roster --- www/teams/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/teams/inner.js b/www/teams/inner.js index 23c333891..d33a214c1 100644 --- a/www/teams/inner.js +++ b/www/teams/inner.js @@ -754,7 +754,7 @@ define([ }); var pending = Object.keys(roster).filter(function (k) { if (!roster[k].pending) { return; } - return roster[k].role === "MEMBER" || !roster[k].role; + return roster[k].role === "VIEWER" || !roster[k].role; }).map(function (k) { return makeMember(common, roster[k], me); }); From b4cc525ca614e6466ab3486d6f999b67a2ec63ae Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Nov 2019 16:52:54 +0100 Subject: [PATCH 11/13] Press enter to add a new item in kanban --- www/kanban/inner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 74abb7f8d..fb3ed93c1 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -152,6 +152,9 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + if (!$(el).closest('.kanban-item').is(':last-child')) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) { @@ -301,6 +304,8 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) { From 8d3e6293cef9aafbab0601a362679b4195a29e54 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 13 Nov 2019 16:52:54 +0100 Subject: [PATCH 12/13] Press enter to add a new item in kanban --- www/kanban/inner.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/kanban/inner.js b/www/kanban/inner.js index 74abb7f8d..fb3ed93c1 100644 --- a/www/kanban/inner.js +++ b/www/kanban/inner.js @@ -152,6 +152,9 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + if (!$(el).closest('.kanban-item').is(':last-child')) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) { @@ -301,6 +304,8 @@ define([ e.preventDefault(); e.stopPropagation(); save(); + if (!$input.val()) { return; } + $(el).closest('.kanban-board').find('.kanban-title-button.fa-plus').click(); return; } if (e.which === 27) { From 99f46888d37b688c4aa1dfa87e6c13f4c99a9fd9 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 14 Nov 2019 08:30:17 -0500 Subject: [PATCH 13/13] add changelog that I forgot to commit/push --- CHANGELOG.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 714d02d59..12df2ec6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,43 @@ -# Elasmotherium release notes +# FalklandWolf release (3.5.0) + +## Goals + +This release features work that we've been planning for a long time centered around sharing collections of documents in a more granular way. + +This is our first release since David Benqué joined our team, so in addition to these team-centric updates we also worked on integrating some UI/UX improvements. + +## Update notes + +Updating to 3.5.0 from 3.4.0 is simple. + +1. stop your server +2. pull the latest code via git +3. run `bower update` +4. restart your server + +## Features + +* We restyled some elements throughout the platform: + * our tooltips have a sleeker flat design + * the quota bar which appears in the drive, teams, and settings pages has also been improved + * we've begun improving the look and feel of various popup dialogs +* We've added support for password-change for owned uploaded files and owned shared folders: + * changing passwords for encrypted files means that the original file will be removed from the server and a new file will be encrypted with a new key and uploaded to a new location on the server. References to the original file will be broken. This includes links, media-tags embedded within pads, and items in other users' drives or shared folders to which you do not have access. + * the process is very similar for shared folders stored in users' CryptDrives, except that users will have the opportunity to enter the new password when they visit the platform. +* We're very happy to finally introduce the notion of _read-only shared folders_. While we've had the capacity to make shared folders read-only for some time, it was only in the same sense as pads were read-only. + * This is to say that while a viewer cannot modify the document, any links to encrypted documents within that document would confer their natural editing rights to viewers, making it possible to accidentally leak access when a single pad was shared. + * Our new read-only shared folders encrypt the editing keys for the documents they contain, such that only those with the ability to change the folder structure itself have the inherent capacity to edit the documents contained within. We think this is more intuitive than the alternative, but it took a lot of work to make it happen! + * Unfortunately, older shared folders created before this release will already contain the cryptographic keys which confer editing rights. Pads which are added to shared folders from this release onward will have the keys for their editing rights encrypted. We'll offer the ability for owners to migrate these shared folders in an upcoming release once we've added the ability to selectively trim document history. +* Similarly, we've introduced the notion of _viewers_ in teams. Viewers are listed in the team roster and have the ability to view the contents of the team's drive, but not to edit them or add new documents. + * Unfortunately, the notion of viewers is also complicated by the fact that documents added to team drives or shared folders in team drives did not have their editing keys encrypted. The first team member to open the team drive since we've deployed this release will run a migration that will encrypt the keys saved within the team drive, however, the encryption keys will remain in the drive's history until we develop a means of selectively trimming history. + +## Bug fixes + +* We discovered and fixed some bugs in the serverside code responsible for handling some aspects of file upload related to starting a new upload after having cancelled a previous session. +* We also identified a regression in Our _slides_ app related to the rendering of `
` tags, such as you might create with a `****` sequence in the corresponding markdown. This was introduced with some overly broad CSS that was intended to style our notifications page. We've since made the notifications styles more specific such that they can't interfere with other applications. +* We've become aware of some mysterious behaviour in Firefox that seems to cause some tabs or functionality to reconnect to the server after going offline while other aspects of the platform did not. Until now we've always assumed that users were connected or not, and this partial connection has revealed some bugs in our implementation. Consequently, we've begun adding some measures to detect odd behaviour if it occurs. We expect to have determined the cause of this behaviour and to have proposed a solution by our next release. + +# Elasmotherium release (3.4.0) ## Goals