Ghost/ghost/admin/app/components/modal-delete-user.js
Naz c7de8d3358 Updated copy for user deletion modal
refs https://github.com/TryGhost/Ghost/issues/15008

- When the user is removed the new flow adds a special tag and reassignes all the user-owned posts to the owner user. Updated copy to inform about this behavior clearly
2022-07-13 00:26:13 +12:00

32 lines
699 B
JavaScript

import ModalComponent from 'ghost-admin/components/modal-base';
import {alias} from '@ember/object/computed';
import {inject as service} from '@ember/service';
import {task} from 'ember-concurrency';
export default ModalComponent.extend({
store: service(),
// Allowed actions
confirm: () => {},
user: alias('model'),
actions: {
confirm() {
this.deleteUser.perform();
}
},
get ownerUser() {
return this.store.peekAll('user').findBy('isOwnerOnly', true);
},
deleteUser: task(function* () {
try {
yield this.confirm();
} finally {
this.send('closeModal');
}
}).drop()
});