From 0276858645d87d35d3510b25b1d1e45b5111467d Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 19 Sep 2019 14:43:21 +0200 Subject: [PATCH] Fix owned upload files as a team --- www/common/cryptpad-common.js | 3 +-- www/common/drive-ui.js | 1 + www/common/sframe-common-file.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 53715f7c1..c389bb4ce 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -112,8 +112,7 @@ define([ }; common.getEdPublic = function (teamId, cb) { postMessage("GET", { - teamId: teamId, - key: ['edPublic'] + key: teamId ? ['teams', teamId, 'keys', 'drive', 'edPublic'] : ['edPublic'] }, function (obj) { cb(obj); }); diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 90b70f4cf..ef5f7e71b 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -4365,6 +4365,7 @@ define([ } var fmConfig = { + teamId: APP.team, noHandlers: true, onUploaded: function () { refresh(); diff --git a/www/common/sframe-common-file.js b/www/common/sframe-common-file.js index 68793e690..c7ca340a6 100644 --- a/www/common/sframe-common-file.js +++ b/www/common/sframe-common-file.js @@ -34,7 +34,7 @@ define([ var origin = common.getMetadataMgr().getPrivateData().origin; var response = Util.response(); - var teamId = config.teamId; // XXX Teams file upload as a team + var teamId = config.teamId; var queue = File.queue = { queue: [],