-
diff --git a/console/src/app/pages/users/user-detail/contact/contact.component.ts b/console/src/app/pages/users/user-detail/contact/contact.component.ts
index bce28bd9ac..ce7d4a28fe 100644
--- a/console/src/app/pages/users/user-detail/contact/contact.component.ts
+++ b/console/src/app/pages/users/user-detail/contact/contact.component.ts
@@ -4,7 +4,7 @@ import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.com
import { Human, UserState } from 'src/app/proto/generated/zitadel/user_pb';
import { CodeDialogComponent } from '../auth-user-detail/code-dialog/code-dialog.component';
-import { EditDialogType } from '../user-detail/user-detail.component';
+import { EditDialogType } from '../auth-user-detail/edit-dialog/edit-dialog.component';
@Component({
selector: 'app-contact',
diff --git a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts
index dad4fad301..0251833bf8 100644
--- a/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts
+++ b/console/src/app/pages/users/user-detail/detail-form/detail-form.component.ts
@@ -1,7 +1,7 @@
import { Component, EventEmitter, Input, OnChanges, OnDestroy, Output } from '@angular/core';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Subscription } from 'rxjs';
-import { Gender, User } from 'src/app/proto/generated/zitadel/user_pb';
+import { Gender, Human, User } from 'src/app/proto/generated/zitadel/user_pb';
@Component({
@@ -11,7 +11,7 @@ import { Gender, User } from 'src/app/proto/generated/zitadel/user_pb';
})
export class DetailFormComponent implements OnDestroy, OnChanges {
@Input() public username!: string;
- @Input() public user!: User;
+ @Input() public user!: Human.AsObject;
@Input() public disabled: boolean = false;
@Input() public genders: Gender[] = [];
@Input() public languages: string[] = ['de', 'en'];
@@ -47,7 +47,7 @@ export class DetailFormComponent implements OnDestroy, OnChanges {
preferredLanguage: [{ value: '', disabled: this.disabled }],
});
- this.profileForm.patchValue({ userName: this.username, ...this.user });
+ this.profileForm.patchValue({ userName: this.username, ...this.user.profile });
if (this.preferredLanguage) {
this.sub = this.preferredLanguage.valueChanges.subscribe(value => {
diff --git a/console/src/app/pages/users/user-detail/user-detail.module.ts b/console/src/app/pages/users/user-detail/user-detail.module.ts
index 40badf1b4a..822ace41e6 100644
--- a/console/src/app/pages/users/user-detail/user-detail.module.ts
+++ b/console/src/app/pages/users/user-detail/user-detail.module.ts
@@ -19,6 +19,7 @@ import { CardModule } from 'src/app/modules/card/card.module';
import { ChangesModule } from 'src/app/modules/changes/changes.module';
import { DetailLayoutModule } from 'src/app/modules/detail-layout/detail-layout.module';
import { InputModule } from 'src/app/modules/input/input.module';
+import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.module';
import { MetaLayoutModule } from 'src/app/modules/meta-layout/meta-layout.module';
import { PasswordComplexityViewModule } from 'src/app/modules/password-complexity-view/password-complexity-view.module';
import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module';
@@ -29,11 +30,11 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe/has-role-pipe.mod
import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe/localized-date-pipe.module';
import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe/timestamp-to-date-pipe.module';
+import { AuthFactorDialogComponent } from './auth-user-detail/auth-factor-dialog/auth-factor-dialog.component';
import { AuthPasswordlessComponent } from './auth-user-detail/auth-passwordless/auth-passwordless.component';
import { AuthUserDetailComponent } from './auth-user-detail/auth-user-detail.component';
import { AuthUserMfaComponent } from './auth-user-detail/auth-user-mfa/auth-user-mfa.component';
import { CodeDialogComponent } from './auth-user-detail/code-dialog/code-dialog.component';
-import { DialogOtpComponent } from './auth-user-detail/dialog-otp/dialog-otp.component';
import { DialogU2FComponent } from './auth-user-detail/dialog-u2f/dialog-u2f.component';
import { EditDialogComponent } from './auth-user-detail/edit-dialog/edit-dialog.component';
import { ResendEmailDialogComponent } from './auth-user-detail/resend-email-dialog/resend-email-dialog.component';
@@ -48,13 +49,11 @@ import { UserDetailRoutingModule } from './user-detail-routing.module';
import { PasswordlessComponent } from './user-detail/passwordless/passwordless.component';
import { UserDetailComponent } from './user-detail/user-detail.component';
import { UserMfaComponent } from './user-detail/user-mfa/user-mfa.component';
-import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.module';
@NgModule({
declarations: [
AuthUserDetailComponent,
UserDetailComponent,
- DialogOtpComponent,
EditDialogComponent,
AuthUserMfaComponent,
AuthPasswordlessComponent,
@@ -68,6 +67,7 @@ import { MachineKeysModule } from 'src/app/modules/machine-keys/machine-keys.mod
ContactComponent,
ResendEmailDialogComponent,
DialogU2FComponent,
+ AuthFactorDialogComponent,
],
imports: [
UserDetailRoutingModule,
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 e4bc356962..596de57508 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
@@ -12,14 +12,9 @@ import { Email, Gender, Machine, Phone, Profile, User, UserState } from 'src/app
import { ManagementService } from 'src/app/services/mgmt.service';
import { ToastService } from 'src/app/services/toast.service';
-import { EditDialogComponent } from '../auth-user-detail/edit-dialog/edit-dialog.component';
+import { EditDialogComponent, EditDialogType } from '../auth-user-detail/edit-dialog/edit-dialog.component';
import { ResendEmailDialogComponent } from '../auth-user-detail/resend-email-dialog/resend-email-dialog.component';
-export enum EditDialogType {
- PHONE = 1,
- EMAIL = 2,
-}
-
@Component({
selector: 'app-user-detail',
templateUrl: './user-detail.component.html',
@@ -87,6 +82,7 @@ export class UserDetailComponent implements OnInit {
}
public saveProfile(profileData: Profile.AsObject): void {
+ console.log(profileData);
if (this.user.human) {
this.user.human.profile = profileData;
this.mgmtUserService
@@ -252,7 +248,8 @@ export class UserDetailComponent implements OnInit {
labelKey: 'ACTIONS.NEWVALUE',
titleKey: 'USER.LOGINMETHODS.PHONE.EDITTITLE',
descriptionKey: 'USER.LOGINMETHODS.PHONE.EDITDESC',
- value: this.user.human?.phone,
+ value: this.user.human?.phone?.phone,
+ type: EditDialogType.PHONE,
},
width: '400px',
});
@@ -271,7 +268,8 @@ export class UserDetailComponent implements OnInit {
labelKey: 'ACTIONS.NEWVALUE',
titleKey: 'USER.LOGINMETHODS.EMAIL.EDITTITLE',
descriptionKey: 'USER.LOGINMETHODS.EMAIL.EDITDESC',
- value: this.user.human?.email,
+ value: this.user.human?.email?.email,
+ type: EditDialogType.EMAIL,
},
width: '400px',
});
diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.html b/console/src/app/pages/users/user-list/user-table/user-table.component.html
index 86444f83e7..49faf322c6 100644
--- a/console/src/app/pages/users/user-list/user-table/user-table.component.html
+++ b/console/src/app/pages/users/user-list/user-table/user-table.component.html
@@ -32,9 +32,10 @@
+
+ *ngIf="user.human && user.human.profile.displayName && user.human?.profile.firstName && user.human?.profile.lastName; else cog"
+ class="avatar" [name]="user.human.profile.displayName" [size]="32">
@@ -45,28 +46,6 @@
|
-
-
- {{ 'USER.PROFILE.FIRSTNAME' | translate }}
-
- |
-
- {{user[type]?.firstName}} |
-
-
-
-
- {{ 'USER.PROFILE.LASTNAME' | translate }}
-
- |
-
- {{user[type]?.lastName}} |
-
-
@@ -75,7 +54,8 @@
[ngTemplateOutletContext]="{key: UserListSearchKey.USERSEARCHKEY_DISPLAY_NAME}">
|
- {{user[type]?.displayName}} |
+ {{user.human?.profile?.displayName}}
+
@@ -83,13 +63,17 @@
{{ 'USER.MACHINE.NAME' | translate }}
- {{user[type]?.name}} |
+ {{user.human?.name}}
+ {{user.machine?.name}}
+
{{ 'USER.MACHINE.DESCRIPTION' | translate }} |
- {{user[type]?.description}} |
+ {{user.human?.description}}
+ {{user.machine?.description}}
+
@@ -111,15 +95,17 @@
[ngTemplateOutletContext]="{key: UserListSearchKey.EMAIL}">
- {{user[type]?.email}} |
+ {{user.human?.email.email}}
+
{{ 'USER.DATA.STATE' | translate }} |
{{
- 'USER.DATA.STATE'+user.state | translate }}
+ [ngClass]="{'active': user.state === UserState.USER_STATE_ACTIVE, 'inactive': user.state === UserState.USER_STATE_INACTIVE}">
+ {{ 'USER.DATA.STATE'+user.state | translate }}
+
|
diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.ts b/console/src/app/pages/users/user-list/user-table/user-table.component.ts
index ba4b64f9d9..3822bdcae4 100644
--- a/console/src/app/pages/users/user-list/user-table/user-table.component.ts
+++ b/console/src/app/pages/users/user-list/user-table/user-table.component.ts
@@ -180,6 +180,8 @@ export class UserTableComponent implements OnInit {
}
this.userService.listUsers(limit, offset, [query]).then(resp => {
+ console.log(resp);
+
if (resp.details?.totalResult) {
this.totalResult = resp.details?.totalResult;
}
diff --git a/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts b/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts
index c9543739c8..1c12e01f95 100644
--- a/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts
+++ b/console/src/app/pipes/timestamp-to-date-pipe/timestamp-to-date.pipe.ts
@@ -11,8 +11,10 @@ export class TimestampToDatePipe implements PipeTransform {
}
private dateFromTimestamp(date: Timestamp.AsObject): any {
- const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000);
- return ts;
+ if (date?.seconds !== undefined && date?.nanos !== undefined) {
+ const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000 / 1000);
+ return ts;
+ }
}
}
diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts
index e0eb16705a..b8700aa250 100644
--- a/console/src/app/services/mgmt.service.ts
+++ b/console/src/app/services/mgmt.service.ts
@@ -1556,7 +1556,6 @@ export class ManagementService {
if (offset) {
query.setOffset(offset);
}
-
req.setQuery(query);
if (queryList) {
req.setQueriesList(queryList);
diff --git a/console/src/assets/environment.json b/console/src/assets/environment.json
index ac321e9859..115ba9f155 100644
--- a/console/src/assets/environment.json
+++ b/console/src/assets/environment.json
@@ -1,7 +1,7 @@
{
- "authServiceUrl": "https://api.zitadel.dev",
- "mgmtServiceUrl": "https://api.zitadel.dev",
- "adminServiceUrl":"https://api.zitadel.dev",
- "issuer": "https://issuer.zitadel.dev",
- "clientid": "70669160379706195@zitadel"
+ "authServiceUrl": "https://api.zitadel.io",
+ "mgmtServiceUrl": "https://api.zitadel.io",
+ "adminServiceUrl":"https://api.zitadel.io",
+ "issuer": "https://issuer.zitadel.io",
+ "clientid": "98804911164221523@zitadel"
}