From 82b1d975edbafc7cc6f4ad1dae5e594a2124dd41 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 18 Sep 2019 16:32:14 +0200 Subject: [PATCH] Display correct owner in the team drive --- www/common/drive-ui.js | 2 +- www/team/inner.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 1c5c7a4b7..90b70f4cf 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -525,7 +525,7 @@ define([ var folders = driveConfig.folders; var files = proxy.drive; var history = driveConfig.history || {}; - var edPublic = priv.edPublic; + var edPublic = driveConfig.edPublic || priv.edPublic; APP.origin = priv.origin; APP.hideDuplicateOwned = Util.find(priv, ['settings', 'drive', 'hideDuplicate']); APP.closed = false; diff --git a/www/team/inner.js b/www/team/inner.js index 97d26fd5b..b8ea4a083 100644 --- a/www/team/inner.js +++ b/www/team/inner.js @@ -93,6 +93,7 @@ define([ if (err) { return void console.error(err); } if (APP.drive && APP.drive.close) { APP.drive.close(); } APP.team = null; + APP.teamEdPublic = null; APP.drive = null; APP.buildUI(common); }); @@ -209,7 +210,8 @@ define([ folders: folders, updateObject: updateObject, updateSharedFolders: updateSharedFolders, - APP: driveAPP + APP: driveAPP, + edPublic: APP.teamEdPublic }); APP.drive = drive; driveAPP.refresh = drive.refresh; @@ -262,6 +264,7 @@ define([ sframeChan.query('Q_SET_TEAM', id, function (err) { if (err) { return void console.error(err); } APP.team = id; + APP.teamEdPublic = Util.find(team, ['keys', 'drive', 'edPublic']); buildUI(common, true); }); });