Disable creation of new polls from the old app

pull/1/head
yflory 4 years ago
parent 79b0460d80
commit aa49e87d97

@ -31,7 +31,7 @@ define([
[ 'code', Msg.type.code],
[ 'slide', Msg.type.slide],
[ 'sheet', Msg.type.sheet],
[ 'poll', Msg.type.poll],
[ 'form', Msg.type.form],
[ 'kanban', Msg.type.kanban],
[ 'whiteboard', Msg.type.whiteboard],
[ 'drive', Msg.type.drive]

@ -2081,6 +2081,7 @@ define([
if (p === 'file') { return; }
if (p === 'accounts') { return; }
if (p === 'calendar') { return; }
if (p === 'poll') { return; } // Replaced by forms
if (!common.isLoggedIn() && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(p) !== -1) { return; }
return true;

@ -2557,6 +2557,7 @@ define([
if (type === 'file') { return; }
if (type === 'accounts') { return; }
if (type === 'calendar') { return; }
if (type === 'poll') { return; } // replaced by forms
if (!APP.loggedIn && AppConfig.registeredOnlyTypes &&
AppConfig.registeredOnlyTypes.indexOf(type) !== -1) {
return;

@ -448,6 +448,7 @@ define([
}
};
funcs.createPad = function (cfg, cb) {
var priv = ctx.metadataMgr.getPrivateData();
if (AppConfig.disableAnonymousPadCreation && !funcs.isLoggedIn()) {
return void UI.errorLoadingScreen(Messages.mustLogin);
}

@ -14,6 +14,10 @@ define([
var obj = SFCommonO.initIframe(waitFor, true);
href = obj.href;
hash = obj.hash;
if (!hash) {
window.location.href = '/form/';
waitFor.abort();
}
}).nThen(function (/*waitFor*/) {
SFCommonO.start({
hash: hash,

Loading…
Cancel
Save