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) {
// 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;

@ -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,

Loading…
Cancel
Save