+export class UserListComponent extends RestTable implements OnInit {
+ @ViewChild('userBanModal', { static: true }) userBanModal: UserBanModalComponent
+
+ users: User[] = []
+ totalRecords = 0
+ rowsPerPage = 10
+ sort: SortMeta = { field: 'createdAt', order: 1 }
+ pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
+
+ selectedUsers: User[] = []
+ bulkUserActions: DropdownAction<User[]>[] = []
+
+ constructor (
+ private notifier: Notifier,
+ private confirmService: ConfirmService,
+ private serverService: ServerService,
+ private userService: UserService,
+ private auth: AuthService,
+ private i18n: I18n
+ ) {
+ super()
+ }
+
+ get authUser () {
+ return this.auth.getUser()
+ }
+
+ get requiresEmailVerification () {
+ return this.serverService.getConfig().signup.requiresEmailVerification
+ }
+
+ ngOnInit () {
+ this.initialize()
+
+ this.bulkUserActions = [
+ {
+ label: this.i18n('Delete'),
+ handler: users => this.removeUsers(users),
+ isDisplayed: users => users.every(u => this.authUser.canManage(u))