BUGFIX: hide sensitive site settings

This commit is contained in:
Régis Hanol
2014-01-06 13:03:53 +01:00
parent a1f80e9e51
commit 8d73b7f94d
4 changed files with 21 additions and 16 deletions

View File

@ -71,9 +71,10 @@ Discourse.SiteSetting = Discourse.Model.extend({
**/
save: function() {
// Update the setting
var setting = this;
return Discourse.ajax("/admin/site_settings/" + (this.get('setting')), {
data: { value: this.get('value') },
var setting = this, data = {};
data[this.get('setting')] = this.get('value');
return Discourse.ajax("/admin/site_settings/" + this.get('setting'), {
data: data,
type: 'PUT'
}).then(function() {
setting.set('originalValue', setting.get('value'));