+ this.serverConfig = this.serverService.getTmpConfig()
+ this.serverService.getConfig()
+ .subscribe(config => this.serverConfig = config)
+
+ this.initialize()
+ this.listenToSearchChange()
+
+ this.bulkUserActions = [
+ [
+ {
+ label: $localize`Delete`,
+ description: $localize`Videos will be deleted, comments will be tombstoned.`,
+ handler: users => this.removeUsers(users),
+ isDisplayed: users => users.every(u => this.authUser.canManage(u))
+ },
+ {
+ label: $localize`Ban`,
+ description: $localize`User won't be able to login anymore, but videos and comments will be kept as is.`,
+ handler: users => this.openBanUserModal(users),
+ isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === false)
+ },
+ {
+ label: $localize`Unban`,
+ handler: users => this.unbanUsers(users),
+ isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === true)
+ }
+ ],
+ [
+ {
+ label: $localize`Set Email as Verified`,
+ handler: users => this.setEmailsAsVerified(users),
+ isDisplayed: users => {
+ return this.requiresEmailVerification &&
+ users.every(u => this.authUser.canManage(u) && !u.blocked && u.emailVerified === false)
+ }
+ }
+ ]
+ ]
+
+ this.columns = [
+ { id: 'username', label: 'Username' },
+ { id: 'email', label: 'Email' },
+ { id: 'quota', label: 'Video quota' },
+ { id: 'role', label: 'Role' },
+ { id: 'createdAt', label: 'Created' }
+ ]
+
+ this.selectedColumns = this.columns.map(c => c.id)
+
+ this.columns.push({ id: 'quotaDaily', label: 'Daily quota' })
+ this.columns.push({ id: 'pluginAuth', label: 'Auth plugin' })
+ this.columns.push({ id: 'lastLoginDate', label: 'Last login' })