1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/components/modals/suspend-user.js
Kevin Ansfield 97300e3531 suspend user feature
requires https://github.com/TryGhost/Ghost/pull/8114
- adds "(Un-)Suspend User" options on user profile page with a modal confirmation screen
- separates team index into "active" and "suspended" users
- adds "suspended" badge to user profile when suspended
2017-03-13 13:00:48 +01:00

23 lines
553 B
JavaScript

import ModalComponent from 'ghost-admin/components/modals/base';
import {invokeAction} from 'ember-invoke-action';
import {alias} from 'ember-computed';
import {task} from 'ember-concurrency';
export default ModalComponent.extend({
user: alias('model'),
suspendUser: task(function* () {
try {
yield invokeAction(this, 'confirm');
} finally {
this.send('closeModal');
}
}).drop(),
actions: {
confirm() {
return this.get('suspendUser').perform();
}
}
});