Ghost/ghost/admin/app/controllers/team/index.js
Kevin Ansfield d0d97d1aa2 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

29 lines
661 B
JavaScript

import Controller from 'ember-controller';
import injectService from 'ember-service/inject';
import {sort} from 'ember-computed';
export default Controller.extend({
showInviteUserModal: false,
activeUsers: null,
suspendedUsers: null,
invites: null,
session: injectService(),
inviteOrder: ['email'],
sortedInvites: sort('invites', 'inviteOrder'),
userOrder: ['name', 'email'],
sortedActiveUsers: sort('activeUsers', 'userOrder'),
sortedSuspendedUsers: sort('suspendedUsers', 'userOrder'),
actions: {
toggleInviteUserModal() {
this.toggleProperty('showInviteUserModal');
}
}
});