diff options
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-update.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-update.component.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index 94ef87b08..04b2935f4 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts | |||
@@ -10,6 +10,7 @@ import { FormValidatorService } from '@app/shared/forms/form-validators/form-val | |||
10 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' | 10 | import { UserValidatorsService } from '@app/shared/forms/form-validators/user-validators.service' |
11 | import { ConfigService } from '@app/+admin/config/shared/config.service' | 11 | import { ConfigService } from '@app/+admin/config/shared/config.service' |
12 | import { UserService } from '@app/shared' | 12 | import { UserService } from '@app/shared' |
13 | import { UserAdminFlag } from '@shared/models/users/user-flag.model' | ||
13 | 14 | ||
14 | @Component({ | 15 | @Component({ |
15 | selector: 'my-user-update', | 16 | selector: 'my-user-update', |
@@ -46,7 +47,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
46 | email: this.userValidatorsService.USER_EMAIL, | 47 | email: this.userValidatorsService.USER_EMAIL, |
47 | role: this.userValidatorsService.USER_ROLE, | 48 | role: this.userValidatorsService.USER_ROLE, |
48 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, | 49 | videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, |
49 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY | 50 | videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, |
51 | byPassAutoBlacklist: null | ||
50 | }, defaultValues) | 52 | }, defaultValues) |
51 | 53 | ||
52 | this.paramsSub = this.route.params.subscribe(routeParams => { | 54 | this.paramsSub = this.route.params.subscribe(routeParams => { |
@@ -67,6 +69,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
67 | this.error = undefined | 69 | this.error = undefined |
68 | 70 | ||
69 | const userUpdate: UserUpdate = this.form.value | 71 | const userUpdate: UserUpdate = this.form.value |
72 | userUpdate.adminFlags = this.buildAdminFlags(this.form.value) | ||
70 | 73 | ||
71 | // A select in HTML is always mapped as a string, we convert it to number | 74 | // A select in HTML is always mapped as a string, we convert it to number |
72 | userUpdate.videoQuota = parseInt(this.form.value['videoQuota'], 10) | 75 | userUpdate.videoQuota = parseInt(this.form.value['videoQuota'], 10) |
@@ -111,7 +114,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
111 | email: userJson.email, | 114 | email: userJson.email, |
112 | role: userJson.role, | 115 | role: userJson.role, |
113 | videoQuota: userJson.videoQuota, | 116 | videoQuota: userJson.videoQuota, |
114 | videoQuotaDaily: userJson.videoQuotaDaily | 117 | videoQuotaDaily: userJson.videoQuotaDaily, |
118 | byPassAutoBlacklist: userJson.adminFlags & UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST | ||
115 | }) | 119 | }) |
116 | } | 120 | } |
117 | } | 121 | } |