More reliable way to detect read-only team

pull/1/head
yflory 5 years ago
parent b5a58e3e0b
commit 295ff98854

@ -3364,7 +3364,7 @@ define([
if (APP.readOnly) { if (APP.readOnly) {
// Read-only drive (team?) // Read-only drive (team?)
$content.prepend($readOnly.clone()); $content.prepend($readOnly.clone());
} else if (folders[sfId] && folders[sfId].readOnly) { } else if (sfId && folders[sfId] && folders[sfId].readOnly) {
// If readonly shared folder... // If readonly shared folder...
$content.prepend($readOnly.clone()); $content.prepend($readOnly.clone());
readOnlyFolder = true; readOnlyFolder = true;

@ -297,7 +297,7 @@ define([
// Provide secondaryKey // Provide secondaryKey
var teamData = (privateData.teams || {})[id] || {}; var teamData = (privateData.teams || {})[id] || {};
driveAPP.readOnly = !teamData.secondaryKey; driveAPP.readOnly = !teamData.hasSecondaryKey;
var drive = DriveUI.create(common, { var drive = DriveUI.create(common, {
proxy: proxy, proxy: proxy,
folders: folders, folders: folders,

Loading…
Cancel
Save