diff options
author | John McLear <john@mclear.co.uk> | 2016-06-13 14:41:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-13 14:41:30 +0800 |
commit | b3b17c21901b82491a869896dac7113ef943d89d (patch) | |
tree | 366582b653f1728e2a0d0344cb10e7a81d84d537 /src/node/hooks | |
parent | 25fd246091392bfd42d61fdb61ba02ccc5eb7135 (diff) | |
parent | a8d5dc0693504671126abcf8680a3a3aa6acaebb (diff) | |
download | etherpad-lite-b3b17c21901b82491a869896dac7113ef943d89d.zip |
Merge pull request #2991 from LokeshN/deactivate-settings
Issue #2960 - deactivate settings.json
Diffstat (limited to 'src/node/hooks')
-rw-r--r-- | src/node/hooks/express/adminsettings.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/node/hooks/express/adminsettings.js b/src/node/hooks/express/adminsettings.js index 4986f093..73691837 100644 --- a/src/node/hooks/express/adminsettings.js +++ b/src/node/hooks/express/adminsettings.js @@ -30,7 +30,13 @@ exports.socketio = function (hook_name, args, cb) { } else { - socket.emit("settings", {results: data}); + //if showSettingsInAdminPage is set to false, then return NOT_ALLOWED in the result + if(settings.showSettingsInAdminPage === false) { + socket.emit("settings", {results:'NOT_ALLOWED'}); + } + else { + socket.emit("settings", {results: data}); + } } }); }); |