Add config options to prevent anonymous users from creating pads #704
parent
d9b9ca680f
commit
f5c029e937
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue