mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Issue #2960 - deactivate settings.json
Deactivate settings.json in Admin dashboard
This commit is contained in:
parent
c5638dd7e5
commit
a8d5dc0693
6 changed files with 35 additions and 2 deletions
|
@ -14,12 +14,20 @@ $(document).ready(function () {
|
|||
|
||||
socket.on('settings', function (settings) {
|
||||
|
||||
/* Check whether the settings.json is authorized to be viewed */
|
||||
if(settings.results === 'NOT_ALLOWED') {
|
||||
$('.innerwrapper').hide();
|
||||
$('.innerwrapper-err').show();
|
||||
$('.err-message').html("Settings json is not authorized to be viewed in Admin page!!");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check to make sure the JSON is clean before proceeding */
|
||||
if(isJSONClean(settings.results))
|
||||
{
|
||||
$('.settings').append(settings.results);
|
||||
$('.settings').focus();
|
||||
$('.settings').autosize();
|
||||
$('.settings').autosize();
|
||||
}
|
||||
else{
|
||||
alert("YOUR JSON IS BAD AND YOU SHOULD FEEL BAD");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue