diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js index 791ecf367..904fe7e45 100644 --- a/www/common/application_config_internal.js +++ b/www/common/application_config_internal.js @@ -134,6 +134,8 @@ define(function() { // Prevent anonymous users from storing pads in their drive AppConfig.disableAnonymousStore = false; + // Prevent anonymous users from creating new pads (they can still access and edit existing ones) + AppConfig.disableAnonymousPadCreation = false; // Hide the usage bar in settings and drive //AppConfig.hideUsageBar = true; diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js index 70c239d67..227656040 100644 --- a/www/common/sframe-common.js +++ b/www/common/sframe-common.js @@ -448,6 +448,9 @@ define([ } }; funcs.createPad = function (cfg, cb) { + if (AppConfig.disableAnonymousPadCreation && !funcs.isLoggedIn()) { + return void UI.errorLoadingScreen(Messages.mustLogin); + } ctx.sframeChan.query("Q_CREATE_PAD", { owned: cfg.owned, expire: cfg.expire,