Fix template issues with teams

pull/1/head
yflory 3 years ago
parent 448a2abb93
commit 8a4ead4711

@ -972,7 +972,7 @@ define([
data.teamId = common.initialTeam;
}
data.forceSave = 1;
delete common.initialTeam;
//delete common.initialTeam;
}
if (common.initialPath) {
if (!data.path) {

@ -1158,10 +1158,12 @@ define([
return void previewMediaTag(data);
}
var obj = { t: APP.team };
var priv = metadataMgr.getPrivateData();
var useUnsafe = Util.find(priv, ['settings', 'security', 'unsafeLinks']);
if (useUnsafe === true || APP.newSharedFolder) {
return void window.open(APP.origin + href);
return void common.openURL(Hash.getNewPadURL(href, obj));
}
// Get hidden hash
@ -1170,7 +1172,7 @@ define([
if (isRo) { opts.view = true; }
var hash = Hash.getHiddenHashFromKeys(parsed.type, secret, opts);
var hiddenHref = Hash.hashToHref(hash, parsed.type);
window.open(APP.origin + hiddenHref);
common.openURL(Hash.getNewPadURL(hiddenHref, obj));
};
var openIn = function (type, path, team, fData) {
var obj = {

@ -1295,6 +1295,7 @@ define([
});
sframeChan.on('Q_SAVE_AS_TEMPLATE', function (data, cb) {
data.teamId = Cryptpad.initialTeam;
Cryptpad.saveAsTemplate(Cryptget.put, data, cb);
});

Loading…
Cancel
Save