diff --git a/console/src/app/pages/users/user-create-machine/user-create-machine.component.html b/console/src/app/pages/users/user-create-machine/user-create-machine.component.html index 1e00d9e6b5..1bc2a97d5b 100644 --- a/console/src/app/pages/users/user-create-machine/user-create-machine.component.html +++ b/console/src/app/pages/users/user-create-machine/user-create-machine.component.html @@ -1,34 +1,34 @@ - + description="{{ 'USER.CREATE.DESCRIPTION' | translate }}"> + -
-
- - {{ 'USER.MACHINE.USERNAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - {{ 'USER.VALIDATION.NOEMAIL' | translate }} - - - - {{ 'USER.MACHINE.NAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.MACHINE.DESCRIPTION' | translate }} - - -
-
- -
-
+
+
+ + {{ 'USER.MACHINE.USERNAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + {{ 'USER.VALIDATION.NOEMAIL' | translate }} + + + + {{ 'USER.MACHINE.NAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.MACHINE.DESCRIPTION' | translate }} + + +
+
+ +
+
\ No newline at end of file diff --git a/console/src/app/pages/users/user-create/user-create.component.html b/console/src/app/pages/users/user-create/user-create.component.html index d8d96e2a20..07a4b526f0 100644 --- a/console/src/app/pages/users/user-create/user-create.component.html +++ b/console/src/app/pages/users/user-create/user-create.component.html @@ -1,95 +1,104 @@ - + description="{{ 'USER.CREATE.DESCRIPTION' | translate }}"> + -
-
-

{{ 'USER.CREATE.NAMEANDEMAILSECTION' | translate }}

- - {{ 'USER.PROFILE.EMAIL' | translate }}* - - - {{ 'USER.VALIDATION.NOTANEMAIL' | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.USERNAME' | translate }}* - - {{envSuffixLabel}} + +
+

{{ 'USER.CREATE.NAMEANDEMAILSECTION' | translate }}

+ + {{ 'USER.PROFILE.EMAIL' | translate }}* + + + {{ 'USER.VALIDATION.NOTANEMAIL' | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.USERNAME' | translate }}* + + {{envSuffixLabel}} - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - {{ 'USER.VALIDATION.NOEMAIL' | translate }} - - -
-
- - {{ 'USER.PROFILE.FIRSTNAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.LASTNAME' | translate }}* - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.NICKNAME' | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + {{ 'USER.VALIDATION.NOEMAIL' | translate }} + + +
+
+ + {{ 'USER.PROFILE.FIRSTNAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.LASTNAME' | translate }}* + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.NICKNAME' | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + -

{{ 'USER.CREATE.GENDERLANGSECTION' | translate }}

+ - - {{ 'USER.PROFILE.GENDER' | translate }} - - - {{ 'GENDERS.'+gender | translate }} - - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - - {{ 'USER.PROFILE.PREFERRED_LANGUAGE' | translate }} - - - {{ 'LANGUAGES.'+language | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - - +

{{ 'USER.CREATE.GENDERLANGSECTION' | translate }}

-

{{ 'USER.CREATE.ADDRESSANDPHONESECTION' | translate }}

+ + {{ 'USER.PROFILE.GENDER' | translate }} + + + {{ 'GENDERS.'+gender | translate }} + + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + + {{ 'USER.PROFILE.PREFERRED_LANGUAGE' | translate }} + + + {{ 'LANGUAGES.'+language | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + + - - {{ 'USER.PROFILE.PHONE' | translate }} - - - {{ 'USER.VALIDATION.REQUIRED' | translate }} - - -
-
- -
- +

{{ 'USER.CREATE.ADDRESSANDPHONESECTION' | translate }}

+ + + {{ 'USER.PROFILE.PHONE' | translate }} + + + {{ 'USER.VALIDATION.REQUIRED' | translate }} + + +
+
+ +
+
\ No newline at end of file diff --git a/console/src/app/pages/users/user-create/user-create.component.scss b/console/src/app/pages/users/user-create/user-create.component.scss index 445092e614..bf2b7ab98c 100644 --- a/console/src/app/pages/users/user-create/user-create.component.scss +++ b/console/src/app/pages/users/user-create/user-create.component.scss @@ -1,4 +1,3 @@ - .form { width: 100%; padding-top: 1rem; @@ -7,8 +6,8 @@ button { margin-top: 3rem; display: block; - padding: .5rem 4rem; - border-radius: .5rem; + padding: 0.5rem 4rem; + border-radius: 0.5rem; } } } @@ -18,19 +17,25 @@ display: flex; flex-wrap: wrap; flex-direction: row; - margin: 0 -.5rem; + margin: 0 -0.5rem; .section { - padding: .5rem; + padding: 0.5rem; flex-basis: 100%; color: var(--grey); - font-size: .9rem; - letter-spacing: .05em; + font-size: 0.9rem; + letter-spacing: 0.05em; text-transform: uppercase; } .formfield { flex: 1 0 33%; - margin: 0 .5rem; + margin: 0 0.5rem; + } + + .email-is-verified { + margin: 0 0.5rem; + flex-basis: 100%; + margin-top: 1.5rem; } } diff --git a/console/src/app/pages/users/user-create/user-create.component.ts b/console/src/app/pages/users/user-create/user-create.component.ts index eda426dadc..da83ca691e 100644 --- a/console/src/app/pages/users/user-create/user-create.component.ts +++ b/console/src/app/pages/users/user-create/user-create.component.ts @@ -38,26 +38,29 @@ export class UserCreateComponent implements OnDestroy { ) { this.loading = true; this.loadOrg(); - this.mgmtService.getOrgIAMPolicy().then((resp) => { - if (resp.policy?.userLoginMustBeDomain) { - this.userLoginMustBeDomain = resp.policy.userLoginMustBeDomain; - } - this.initForm(); - this.loading = false; - this.envSuffixLabel = this.envSuffix(); - this.changeDetRef.detectChanges(); - }).catch(error => { - console.error(error); - this.initForm(); - this.loading = false; - this.envSuffixLabel = this.envSuffix(); - this.changeDetRef.detectChanges(); - }); + this.mgmtService + .getOrgIAMPolicy() + .then((resp) => { + if (resp.policy?.userLoginMustBeDomain) { + this.userLoginMustBeDomain = resp.policy.userLoginMustBeDomain; + } + this.initForm(); + this.loading = false; + this.envSuffixLabel = this.envSuffix(); + this.changeDetRef.detectChanges(); + }) + .catch((error) => { + console.error(error); + this.initForm(); + this.loading = false; + this.envSuffixLabel = this.envSuffix(); + this.changeDetRef.detectChanges(); + }); } private async loadOrg(): Promise { - const domains = (await this.mgmtService.listOrgDomains()); - const found = domains.resultList.find(resp => resp.isPrimary); + const domains = await this.mgmtService.listOrgDomains(); + const found = domains.resultList.find((resp) => resp.isPrimary); if (found) { this.primaryDomain = found; } @@ -66,32 +69,26 @@ export class UserCreateComponent implements OnDestroy { private initForm(): void { this.userForm = this.fb.group({ email: ['', [Validators.required, Validators.email]], - userName: ['', - [ - Validators.required, - Validators.minLength(2), - ], - ], + userName: ['', [Validators.required, Validators.minLength(2)]], firstName: ['', Validators.required], lastName: ['', Validators.required], nickName: [''], gender: [], preferredLanguage: [''], phone: [''], + isVerified: [false, []], }); - this.userForm.controls['phone'].valueChanges.pipe( - takeUntil(this.destroyed$), - debounceTime(300)).subscribe(value => { - const phoneNumber = parsePhoneNumber(value ?? '', 'CH'); - if (phoneNumber) { - const formmatted = phoneNumber.formatInternational(); - const country = phoneNumber.country; - if (this.phone && country && this.phone.value && this.phone.value !== formmatted) { - this.phone.setValue(formmatted); - } + this.userForm.controls['phone'].valueChanges.pipe(takeUntil(this.destroyed$), debounceTime(300)).subscribe((value) => { + const phoneNumber = parsePhoneNumber(value ?? '', 'CH'); + if (phoneNumber) { + const formmatted = phoneNumber.formatInternational(); + const country = phoneNumber.country; + if (this.phone && country && this.phone.value && this.phone.value !== formmatted) { + this.phone.setValue(formmatted); } - }); + } + }); } public createUser(): void { @@ -110,7 +107,10 @@ export class UserCreateComponent implements OnDestroy { humanReq.setUserName(this.userName?.value); humanReq.setProfile(profileReq); - humanReq.setEmail(new AddHumanUserRequest.Email().setEmail(this.email?.value)); + const emailreq = new AddHumanUserRequest.Email(); + emailreq.setEmail(this.email?.value); + emailreq.setIsEmailVerified(this.isVerified?.value); + humanReq.setEmail(emailreq); if (this.phone && this.phone.value) { humanReq.setPhone(new AddHumanUserRequest.Phone().setPhone(this.phone.value)); @@ -123,7 +123,7 @@ export class UserCreateComponent implements OnDestroy { this.toast.showInfo('USER.TOAST.CREATED', true); this.router.navigate(['users', data.userId]); }) - .catch(error => { + .catch((error) => { this.loading = false; this.toast.showError(error); }); @@ -137,6 +137,9 @@ export class UserCreateComponent implements OnDestroy { public get email(): AbstractControl | null { return this.userForm.get('email'); } + public get isVerified(): AbstractControl | null { + return this.userForm.get('isVerified'); + } public get userName(): AbstractControl | null { return this.userForm.get('userName'); } diff --git a/console/src/app/pages/users/user-create/user-create.module.ts b/console/src/app/pages/users/user-create/user-create.module.ts index 944c27a391..afcf51088f 100644 --- a/console/src/app/pages/users/user-create/user-create.module.ts +++ b/console/src/app/pages/users/user-create/user-create.module.ts @@ -11,29 +11,31 @@ import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; import { TranslateModule } from '@ngx-translate/core'; import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module'; +import { InfoSectionModule } from 'src/app/modules/info-section/info-section.module'; import { InputModule } from 'src/app/modules/input/input.module'; import { UserCreateRoutingModule } from './user-create-routing.module'; import { UserCreateComponent } from './user-create.component'; @NgModule({ - declarations: [UserCreateComponent], - imports: [ - UserCreateRoutingModule, - CommonModule, - FormsModule, - ReactiveFormsModule, - MatSelectModule, - MatButtonModule, - MatIconModule, - MatProgressSpinnerModule, - MatProgressBarModule, - MatCheckboxModule, - MatTooltipModule, - TranslateModule, - DetailLayoutModule, - InputModule, - MatRippleModule, - ], + declarations: [UserCreateComponent], + imports: [ + UserCreateRoutingModule, + CommonModule, + FormsModule, + ReactiveFormsModule, + MatSelectModule, + MatButtonModule, + MatIconModule, + MatProgressSpinnerModule, + MatProgressBarModule, + MatCheckboxModule, + MatTooltipModule, + TranslateModule, + InfoSectionModule, + DetailLayoutModule, + InputModule, + MatRippleModule, + ], }) -export class UserCreateModule { } +export class UserCreateModule {} diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.scss index 0563e8e73a..209911816c 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.scss +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.scss @@ -27,11 +27,11 @@ .btn-container { display: flex; justify-content: flex-end; - margin: 0 -.5rem; + margin: 0 -0.5rem; button { - border-radius: .5rem; - margin: 0 .5rem; + border-radius: 0.5rem; + margin: 0 0.5rem; } } @@ -39,11 +39,11 @@ display: flex; flex-wrap: wrap; align-items: stretch; - margin: -1.5rem -.5rem; + margin: -1.5rem -0.5rem; .app-card { flex: 1; - margin: .5rem; + margin: 0.5rem; } } @@ -55,6 +55,7 @@ .resendemail { margin-right: 1rem; + margin-top: 0.5rem; } .side-padding { diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts index 316e6d50ad..f4be9fe7af 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-detail.component.ts @@ -227,9 +227,9 @@ export class AuthUserDetailComponent implements OnDestroy { width: '400px', }); - dialogRefPhone.afterClosed().subscribe((resp) => { - if (resp) { - this.savePhone(resp); + dialogRefPhone.afterClosed().subscribe((resp: { value: string; isVerified: boolean }) => { + if (resp && resp.value) { + this.savePhone(resp.value); } }); break; @@ -247,9 +247,9 @@ export class AuthUserDetailComponent implements OnDestroy { width: '400px', }); - dialogRefEmail.afterClosed().subscribe((resp) => { - if (resp) { - this.saveEmail(resp); + dialogRefEmail.afterClosed().subscribe((resp: { value: string; isVerified: boolean }) => { + if (resp && resp.value) { + this.saveEmail(resp.value); } }); break; diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html index 288500dffd..4130c03761 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.html @@ -1,22 +1,32 @@

- {{data.titleKey | translate}} + {{data.titleKey | translate}}

{{data.descriptionKey | translate}}

- - {{data.labelKey | translate }} ({{ phoneCountry }}) - - - + + {{data.labelKey | translate }} ({{ phoneCountry }}) + + + + + + + {{data.isVerifiedTextKey | + translate}} + + + {{data.isVerifiedTextDescKey | translate}} + +
- + - +
\ No newline at end of file diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.scss index 06520a5471..0fc93bcd89 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.scss +++ b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.scss @@ -2,6 +2,10 @@ width: 100%; } +.verified-checkbox { + margin-top: 1.5rem; +} + .desc { font-size: 14px; color: var(--grey); @@ -12,10 +16,10 @@ justify-content: flex-end; .ok-button { - margin-left: .5rem; + margin-left: 0.5rem; } button { - border-radius: .5rem; + border-radius: 0.5rem; } } diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts index 78ee1e9578..18308a403c 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts +++ b/console/src/app/pages/users/user-detail/auth-user-detail/edit-dialog/edit-dialog.component.ts @@ -15,16 +15,17 @@ export enum EditDialogType { }) export class EditDialogComponent { public isPhone: boolean = false; + public isVerified: boolean = false; public phoneCountry: string = 'CH'; public valueControl: FormControl = new FormControl(['', [Validators.required]]); - constructor(public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { + public EditDialogType: any = EditDialogType; + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any) { this.valueControl.setValue(data.value); if (data.type === EditDialogType.PHONE) { this.isPhone = true; } - this.valueControl.valueChanges.subscribe(value => { + this.valueControl.valueChanges.subscribe((value) => { if (value && value.length > 1) { this.changeValue(value); } @@ -53,6 +54,6 @@ export class EditDialogComponent { } closeDialogWithValue(): void { - this.dialogRef.close(this.valueControl.value); + this.dialogRef.close({ value: this.valueControl.value, isVerified: this.isVerified }); } } diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss index 22daeb0bc0..0b1adef88c 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.scss @@ -19,7 +19,7 @@ } p { - margin: .5rem 0; + margin: 0.5rem 0; font-size: 14px; color: var(--grey); } @@ -30,13 +30,13 @@ } .actions-trigger { - margin-top: .25rem; + margin-top: 0.25rem; display: flex; align-items: center; .icon { - margin-left: .5rem; - margin-right: -.5rem; + margin-left: 0.5rem; + margin-right: -0.5rem; } } } @@ -66,3 +66,7 @@ .side-padding { padding-top: 1rem; } + +.resendemail { + margin-top: 0.5rem; +} diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts index 42a174487f..e2692d058d 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.ts @@ -229,10 +229,10 @@ export class UserDetailComponent implements OnInit { }); } - public saveEmail(email: string): void { + public saveEmail(email: string, isVerified: boolean): void { if (this.user.id && email) { this.mgmtUserService - .updateHumanEmail(this.user.id, email) + .updateHumanEmail(this.user.id, email, isVerified) .then(() => { this.toast.showInfo('USER.TOAST.EMAILSAVED', true); if (this.user.state === UserState.USER_STATE_INITIAL) { @@ -355,9 +355,9 @@ export class UserDetailComponent implements OnInit { width: '400px', }); - dialogRefPhone.afterClosed().subscribe((resp) => { - if (resp) { - this.savePhone(resp); + dialogRefPhone.afterClosed().subscribe((resp: { value: string; isVerified: boolean }) => { + if (resp && resp.value) { + this.savePhone(resp.value); } }); break; @@ -369,15 +369,17 @@ export class UserDetailComponent implements OnInit { labelKey: 'ACTIONS.NEWVALUE', titleKey: 'USER.LOGINMETHODS.EMAIL.EDITTITLE', descriptionKey: 'USER.LOGINMETHODS.EMAIL.EDITDESC', + isVerifiedTextKey: 'USER.LOGINMETHODS.EMAIL.ISVERIFIED', + isVerifiedTextDescKey: 'USER.LOGINMETHODS.EMAIL.ISVERIFIEDDESC', value: this.user.human?.email?.email, type: EditDialogType.EMAIL, }, width: '400px', }); - dialogRefEmail.afterClosed().subscribe((resp) => { - if (resp) { - this.saveEmail(resp); + dialogRefEmail.afterClosed().subscribe((resp: { value: string; isVerified: boolean }) => { + if (resp && resp.value) { + this.saveEmail(resp.value, resp.isVerified); } }); break; diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index b61f50232b..53f087fcbe 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -899,32 +899,24 @@ export class ManagementService { return this.grpcService.mgmt.listHumanLinkedIDPs(req, null).then((resp) => resp.toObject()); } - public getAction( - id: string, - ): Promise { + public getAction(id: string): Promise { const req = new GetActionRequest(); req.setId(id); - return this.grpcService.mgmt.getAction(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.getAction(req, null).then((resp) => resp.toObject()); } - public createAction( - req: CreateActionRequest, - ): Promise { - return this.grpcService.mgmt.createAction(req, null).then(resp => resp.toObject()); + public createAction(req: CreateActionRequest): Promise { + return this.grpcService.mgmt.createAction(req, null).then((resp) => resp.toObject()); } - public updateAction( - req: UpdateActionRequest, - ): Promise { - return this.grpcService.mgmt.updateAction(req, null).then(resp => resp.toObject()); + public updateAction(req: UpdateActionRequest): Promise { + return this.grpcService.mgmt.updateAction(req, null).then((resp) => resp.toObject()); } - public deleteAction( - id: string, - ): Promise { + public deleteAction(id: string): Promise { const req = new DeleteActionRequest(); req.setId(id); - return this.grpcService.mgmt.deleteAction(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.deleteAction(req, null).then((resp) => resp.toObject()); } public listActions( @@ -949,23 +941,19 @@ export class ManagementService { metadata.setAsc(asc); } req.setQuery(metadata); - return this.grpcService.mgmt.listActions(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.listActions(req, null).then((resp) => resp.toObject()); } - public getFlow( - type: FlowType - ): Promise { + public getFlow(type: FlowType): Promise { const req = new GetFlowRequest(); req.setType(type); - return this.grpcService.mgmt.getFlow(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.getFlow(req, null).then((resp) => resp.toObject()); } - public clearFlow( - type: FlowType - ): Promise { + public clearFlow(type: FlowType): Promise { const req = new ClearFlowRequest(); req.setType(type); - return this.grpcService.mgmt.clearFlow(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.clearFlow(req, null).then((resp) => resp.toObject()); } public setTriggerActions( @@ -977,7 +965,7 @@ export class ManagementService { req.setActionIdsList(actionIdsList); req.setFlowType(type); req.setTriggerType(triggerType); - return this.grpcService.mgmt.setTriggerActions(req, null).then(resp => resp.toObject()); + return this.grpcService.mgmt.setTriggerActions(req, null).then((resp) => resp.toObject()); } public getIAM(): Promise { @@ -1468,10 +1456,13 @@ export class ManagementService { return this.grpcService.mgmt.getHumanEmail(req, null).then((resp) => resp.toObject()); } - public updateHumanEmail(userId: string, email: string): Promise { + public updateHumanEmail(userId: string, email: string, isVerified?: boolean): Promise { const req = new UpdateHumanEmailRequest(); req.setUserId(userId); req.setEmail(email); + if (isVerified) { + req.setIsEmailVerified(isVerified); + } return this.grpcService.mgmt.updateHumanEmail(req, null).then((resp) => resp.toObject()); } diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 786a8f0d8a..5252f470e6 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -419,6 +419,8 @@ "EMAIL": { "TITLE": "E-Mail", "VALID": "Validiert", + "ISVERIFIED": "Email Verifiziert", + "ISVERIFIEDDESC": "Wenn die Email als verifiziert angegeben wird, wird keine Initialisierungsmail versendet.", "RESEND": "Verifikationsmail erneut senden", "EDITTITLE": "Email ändern", "EDITDESC": "Geben Sie die neue Email in dem darunterliegenden Feld ein!" diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index a0ab857bc8..8fc1ae13fc 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -419,6 +419,8 @@ "EMAIL": { "TITLE": "E-mail", "VALID": "validated", + "ISVERIFIED": "Email Verified", + "ISVERIFIEDDESC": "If the email is indicated as verified, no initialization email will be sent.", "RESEND": "Resend Verification E-mail", "EDITTITLE": "Change Email", "EDITDESC": "Enter the new email in the field below." diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index f4de1cc499..fa8231e353 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -419,6 +419,8 @@ "EMAIL": { "TITLE": "E-mail", "VALID": "convalidato", + "ISVERIFIED": "Email Verificato", + "ISVERIFIEDDESC": "Se l'email viene indicata come verificata, non verrà inviata alcuna email di inizializzazione.", "RESEND": "Invia di nuovo l'e-mail di verifica", "EDITTITLE": "Cambiare l'e-mail", "EDITDESC": "Inserisci la nuova email nel campo sottostante."