2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-08 12:06:51 +08:00

Revert "Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS""

This reverts commit c21457d6a7.
This commit is contained in:
Sam 2015-11-21 12:27:06 +11:00
parent d8734fc542
commit 5c899c765b
99 changed files with 394 additions and 384 deletions

View file

@ -1,3 +1,5 @@
import ApiKey from 'admin/models/api-key';
/**
This controller supports the interface for dealing with API keys
@ -16,7 +18,7 @@ export default Ember.ArrayController.extend({
**/
generateMasterKey: function() {
var self = this;
Discourse.ApiKey.generateMasterKey().then(function (key) {
ApiKey.generateMasterKey().then(function (key) {
self.get('model').pushObject(key);
});
},
@ -25,7 +27,7 @@ export default Ember.ArrayController.extend({
Creates an API key instance with internal user object
@method regenerateKey
@param {Discourse.ApiKey} key the key to regenerate
@param {ApiKey} key the key to regenerate
**/
regenerateKey: function(key) {
bootbox.confirm(I18n.t("admin.api.confirm_regen"), I18n.t("no_value"), I18n.t("yes_value"), function(result) {
@ -39,7 +41,7 @@ export default Ember.ArrayController.extend({
Revokes an API key
@method revokeKey
@param {Discourse.ApiKey} key the key to revoke
@param {ApiKey} key the key to revoke
**/
revokeKey: function(key) {
var self = this;