From 295ff98854229fc29c60853625ad0568fa906b3d Mon Sep 17 00:00:00 2001 From: yflory Date: Tue, 12 Nov 2019 17:59:50 +0100 Subject: [PATCH] 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,