aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/users/user-list/user-list.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/+admin/users/user-list/user-list.component.ts')
-rw-r--r--client/src/app/+admin/users/user-list/user-list.component.ts52
1 files changed, 29 insertions, 23 deletions
diff --git a/client/src/app/+admin/users/user-list/user-list.component.ts b/client/src/app/+admin/users/user-list/user-list.component.ts
index 1083ba291..a596251f6 100644
--- a/client/src/app/+admin/users/user-list/user-list.component.ts
+++ b/client/src/app/+admin/users/user-list/user-list.component.ts
@@ -23,7 +23,7 @@ export class UserListComponent extends RestTable implements OnInit {
23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 } 23 pagination: RestPagination = { count: this.rowsPerPage, start: 0 }
24 24
25 selectedUsers: User[] = [] 25 selectedUsers: User[] = []
26 bulkUserActions: DropdownAction<User[]>[] = [] 26 bulkUserActions: DropdownAction<User[]>[][] = []
27 27
28 private serverConfig: ServerConfig 28 private serverConfig: ServerConfig
29 29
@@ -54,29 +54,35 @@ export class UserListComponent extends RestTable implements OnInit {
54 this.initialize() 54 this.initialize()
55 55
56 this.bulkUserActions = [ 56 this.bulkUserActions = [
57 { 57 [
58 label: this.i18n('Delete'), 58 {
59 handler: users => this.removeUsers(users), 59 label: this.i18n('Delete'),
60 isDisplayed: users => users.every(u => this.authUser.canManage(u)) 60 description: this.i18n('Videos will be deleted, comments will be tombstoned.'),
61 }, 61 handler: users => this.removeUsers(users),
62 { 62 isDisplayed: users => users.every(u => this.authUser.canManage(u))
63 label: this.i18n('Ban'), 63 },
64 handler: users => this.openBanUserModal(users), 64 {
65 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === false) 65 label: this.i18n('Ban'),
66 }, 66 description: this.i18n('Videos will be kept as private, comments will be kept as is.'),
67 { 67 handler: users => this.openBanUserModal(users),
68 label: this.i18n('Unban'), 68 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === false)
69 handler: users => this.unbanUsers(users), 69 },
70 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === true) 70 {
71 }, 71 label: this.i18n('Unban'),
72 { 72 handler: users => this.unbanUsers(users),
73 label: this.i18n('Set Email as Verified'), 73 isDisplayed: users => users.every(u => this.authUser.canManage(u) && u.blocked === true)
74 handler: users => this.setEmailsAsVerified(users),
75 isDisplayed: users => {
76 return this.requiresEmailVerification &&
77 users.every(u => this.authUser.canManage(u) && !u.blocked && u.emailVerified === false)
78 } 74 }
79 } 75 ],
76 [
77 {
78 label: this.i18n('Set Email as Verified'),
79 handler: users => this.setEmailsAsVerified(users),
80 isDisplayed: users => {
81 return this.requiresEmailVerification &&
82 users.every(u => this.authUser.canManage(u) && !u.blocked && u.emailVerified === false)
83 }
84 }
85 ]
80 ] 86 ]
81 } 87 }
82 88