diff --git a/app/assets/javascripts/admin/services/admin-tools.js.es6 b/app/assets/javascripts/admin/services/admin-tools.js.es6 index 439b85cd421..a1b4b0c2926 100644 --- a/app/assets/javascripts/admin/services/admin-tools.js.es6 +++ b/app/assets/javascripts/admin/services/admin-tools.js.es6 @@ -28,6 +28,11 @@ export default Ember.Service.extend({ }; }, + // Can be overridden to extend the modal contents if necessary + beforeControlModal() { + return Ember.RSVP.resolve(); + }, + _showControlModal(type, user, opts) { opts = opts || {}; @@ -39,11 +44,11 @@ export default Ember.Service.extend({ controller.set('post', opts.post); } - let promise = user.adminUserView ? - Ember.RSVP.resolve(user) : - AdminUser.find(user.get('id')); - - promise.then(loadedUser => { + return this.beforeControlModal(controller).then(() => { + return user.adminUserView ? + Ember.RSVP.resolve(user) : + AdminUser.find(user.get('id')); + }).then(loadedUser => { controller.setProperties({ user: loadedUser, loadingUser: false,