From 63502abce834a1aeb6b0afb5b81bddd52aec1a7b Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 29 Oct 2020 14:39:23 +0100 Subject: [PATCH 1/2] Prompt to store edit link to your drive when you're a team viewer --- www/common/outer/async-store.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index e849ce20d..290147427 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -1080,6 +1080,11 @@ define([ if (data.teamId && s.id !== data.teamId) { return; } if (storeLocally && s.id) { return; } + // If this is an edit link but we don't have edit rights, this entry is not useful + if (h.mode === "edit" && !s.secondaryKey) { + return; + } + var res = s.manager.findChannel(channel, true); if (res.length) { sendTo.push(s.id); From 83b318f156e57408617eb27e1f8e4c4139dc95aa Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 29 Oct 2020 14:44:14 +0100 Subject: [PATCH 2/2] Fix safe links with wrong access rights --- www/common/sframe-common-outer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index aebafa834..a03be3f64 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -317,10 +317,11 @@ define([ return void noPadData('NO_RESULT'); } // Data found but weaker? warn + expire = res.expire; if (edit && !res.href) { newHref = res.roHref; + return; } - expire = res.expire; // We have good data, keep the hash in memory newHref = edit ? res.href : (res.roHref || res.href); }));