X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=inline;f=client%2Fsrc%2Fapp%2F%2Badmin%2Fusers%2Fuser-edit%2Fuser-create.component.ts;h=3b57a49c6df07ecd722e108ed844c9ef9f32506e;hb=a95a4cc89155f448e6f9ca0957170f3c72a9d964;hp=137ecfcbddc1c7d51d995f3458e7c34c715afe9f;hpb=73471b1a52f242e86364ffb077ea6cadb3b07ae2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/+admin/users/user-edit/user-create.component.ts b/client/src/app/+admin/users/user-edit/user-create.component.ts index 137ecfcbd..3b57a49c6 100644 --- a/client/src/app/+admin/users/user-edit/user-create.component.ts +++ b/client/src/app/+admin/users/user-edit/user-create.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core' import { Router } from '@angular/router' -import { Notifier, ServerService } from '@app/core' +import { AuthService, Notifier, ServerService } from '@app/core' import { UserCreate, UserRole } from '../../../../../../shared' import { UserEdit } from './user-edit' import { I18n } from '@ngx-translate/i18n-polyfill' @@ -21,6 +21,7 @@ export class UserCreateComponent extends UserEdit implements OnInit { protected serverService: ServerService, protected formValidatorService: FormValidatorService, protected configService: ConfigService, + protected auth: AuthService, private userValidatorsService: UserValidatorsService, private router: Router, private notifier: Notifier, @@ -45,7 +46,8 @@ export class UserCreateComponent extends UserEdit implements OnInit { password: this.userValidatorsService.USER_PASSWORD, role: this.userValidatorsService.USER_ROLE, videoQuota: this.userValidatorsService.USER_VIDEO_QUOTA, - videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY + videoQuotaDaily: this.userValidatorsService.USER_VIDEO_QUOTA_DAILY, + byPassAutoBlacklist: null }, defaultValues) } @@ -54,8 +56,11 @@ export class UserCreateComponent extends UserEdit implements OnInit { const userCreate: UserCreate = this.form.value + userCreate.adminFlags = this.buildAdminFlags(this.form.value) + // A select in HTML is always mapped as a string, we convert it to number userCreate.videoQuota = parseInt(this.form.value['videoQuota'], 10) + userCreate.videoQuotaDaily = parseInt(this.form.value['videoQuotaDaily'], 10) this.userService.addUser(userCreate).subscribe( () => {