From b5376b2e5a95ac626bbac282c48f3b09f84437de Mon Sep 17 00:00:00 2001 From: Max Peintner Date: Wed, 17 Jun 2020 17:11:36 +0200 Subject: [PATCH] feat(console): add and remove org domains, show userLoginNames (#235) * org domains, user login names * switch user to userview, regen proto --- .../orgs/org-detail/org-detail.component.html | 35 +- .../orgs/org-detail/org-detail.component.scss | 38 ++ .../orgs/org-detail/org-detail.component.ts | 16 + .../orgs/org-members/org-members.component.ts | 3 +- .../project-contributors.component.ts | 2 +- .../auth-user-detail.component.ts | 10 +- .../user-detail/user-detail.component.html | 8 + .../user-detail/user-detail.component.scss | 57 ++ .../user-detail/user-detail.component.ts | 4 +- .../app/proto/generated/auth_grpc_web_pb.d.ts | 13 + .../app/proto/generated/auth_grpc_web_pb.js | 80 +++ console/src/app/proto/generated/auth_pb.d.ts | 46 +- console/src/app/proto/generated/auth_pb.js | 593 +++++++++--------- .../src/app/proto/generated/management_pb.js | 12 +- console/src/app/services/mgmt-user.service.ts | 3 +- console/src/app/services/org.service.ts | 22 + console/src/assets/i18n/de.json | 6 +- console/src/assets/i18n/en.json | 4 + 18 files changed, 613 insertions(+), 339 deletions(-) diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.html b/console/src/app/pages/orgs/org-detail/org-detail.component.html index 74ae9cdd1f..0a8b77336c 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.html +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.html @@ -3,6 +3,38 @@

{{org?.name}}

{{'ORG_DETAIL.DESCRIPTION' | translate}}

+ +
+ {{domain.domain}} + + + + + +
+ +

{{'ORG.PAGES.ORGDOMAIN_VERIFICATION' | translate}}

+
+ + new domain + + + + + + + +
+
+ @@ -12,7 +44,8 @@
Domains: - {{domain.domain}} + {{domain.domain}}
State: diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.scss b/console/src/app/pages/orgs/org-detail/org-detail.component.scss index 156dd5dac9..c1fc0e0c45 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.scss +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.scss @@ -55,6 +55,43 @@ h1 { } } +.domain { + display: flex; + align-items: center; + padding: .5rem 0; + flex-wrap: wrap; + + + .title { + font-size: 16px; + margin-right: 1rem; + } + + .verified, .primary{ + color: #5282c1; + margin-right: 1rem; + } + + .fill-space { + flex: 1; + } +} + +.new-desc { + font-size: 14px; + color: #818a8a; +} + +.new-row { + display: flex; + flex-wrap: wrap; + align-items: center; + + mat-form-field { + flex: 1; + } +} + .side { .details { margin-bottom: 1rem; @@ -96,6 +133,7 @@ h1 { text-overflow: ellipsis; overflow: hidden; margin-left: 1rem; + text-align: right; } a { diff --git a/console/src/app/pages/orgs/org-detail/org-detail.component.ts b/console/src/app/pages/orgs/org-detail/org-detail.component.ts index b0d4c3ac30..e310ca6e1d 100644 --- a/console/src/app/pages/orgs/org-detail/org-detail.component.ts +++ b/console/src/app/pages/orgs/org-detail/org-detail.component.ts @@ -30,6 +30,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy { private subscription: Subscription = new Subscription(); public domains: OrgDomainView.AsObject[] = []; + public newDomain: string = ''; constructor( public translate: TranslateService, @@ -76,4 +77,19 @@ export class OrgDetailComponent implements OnInit, OnDestroy { }); } } + + public saveNewOrgDomain(): void { + this.orgService.AddMyOrgDomain(this.newDomain).then(domain => { + this.domains.push(domain.toObject()); + }); + } + + public removeDomain(domain: string): void { + console.log(domain); + this.orgService.RemoveMyOrgDomain(domain).then(() => { + this.toast.showInfo('Removed'); + }).catch(error => { + this.toast.showError(error.message); + }); + } } diff --git a/console/src/app/pages/orgs/org-members/org-members.component.ts b/console/src/app/pages/orgs/org-members/org-members.component.ts index 35c1270c2c..777984fc48 100644 --- a/console/src/app/pages/orgs/org-members/org-members.component.ts +++ b/console/src/app/pages/orgs/org-members/org-members.component.ts @@ -6,8 +6,7 @@ import { MatTable } from '@angular/material/table'; import { ActivatedRoute } from '@angular/router'; import { tap } from 'rxjs/operators'; import { CreationType, MemberCreateDialogComponent } from 'src/app/modules/add-member-dialog/member-create-dialog.component'; -import { User } from 'src/app/proto/generated/auth_pb'; -import { Org, ProjectMember, ProjectType } from 'src/app/proto/generated/management_pb'; +import { Org, ProjectMember, ProjectType, User } from 'src/app/proto/generated/management_pb'; import { OrgService } from 'src/app/services/org.service'; import { ToastService } from 'src/app/services/toast.service'; diff --git a/console/src/app/pages/projects/project-contributors/project-contributors.component.ts b/console/src/app/pages/projects/project-contributors/project-contributors.component.ts index 5d18321291..bedf45f012 100644 --- a/console/src/app/pages/projects/project-contributors/project-contributors.component.ts +++ b/console/src/app/pages/projects/project-contributors/project-contributors.component.ts @@ -3,7 +3,6 @@ import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { BehaviorSubject, from, of } from 'rxjs'; import { catchError, finalize, map } from 'rxjs/operators'; -import { User } from 'src/app/proto/generated/auth_pb'; import { ProjectGrantView, ProjectMemberSearchResponse, @@ -11,6 +10,7 @@ import { ProjectState, ProjectType, ProjectView, + User, } from 'src/app/proto/generated/management_pb'; import { ProjectService } from 'src/app/services/project.service'; import { ToastService } from 'src/app/services/toast.service'; diff --git a/console/src/app/pages/user-detail/auth-user-detail/auth-user-detail.component.ts b/console/src/app/pages/user-detail/auth-user-detail/auth-user-detail.component.ts index f6d1aff65b..8b1a15e80f 100644 --- a/console/src/app/pages/user-detail/auth-user-detail/auth-user-detail.component.ts +++ b/console/src/app/pages/user-detail/auth-user-detail/auth-user-detail.component.ts @@ -3,7 +3,7 @@ import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/fo import { MatDialog } from '@angular/material/dialog'; import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; -import { Gender, User, UserAddress, UserEmail, UserPhone, UserProfile } from 'src/app/proto/generated/auth_pb'; +import { Gender, UserAddress, UserEmail, UserPhone, UserProfile } from 'src/app/proto/generated/auth_pb'; import { PasswordComplexityPolicy } from 'src/app/proto/generated/management_pb'; import { AuthUserService } from 'src/app/services/auth-user.service'; import { MgmtUserService } from 'src/app/services/mgmt-user.service'; @@ -33,8 +33,6 @@ function passwordConfirmValidator(c: AbstractControl): any { styleUrls: ['./auth-user-detail.component.scss'], }) export class AuthUserDetailComponent implements OnDestroy { - public user!: User.AsObject; - public profile!: UserProfile.AsObject; public email: UserEmail.AsObject = { email: '' } as any; public phone: UserPhone.AsObject = { phone: '' } as any; @@ -267,12 +265,6 @@ export class AuthUserDetailComponent implements OnDestroy { } private async getData(): Promise { - // this.mgmtUserService.GetUserByID(id).then(user => { - // console.log(user.toObject()); - // this.user = user.toObject(); - // }).catch(err => { - // console.error(err); - // }); this.profile = (await this.userService.GetMyUserProfile()).toObject(); this.email = (await this.userService.GetMyUserEmail()).toObject(); this.phone = (await this.userService.GetMyUserPhone()).toObject(); diff --git a/console/src/app/pages/user-detail/user-detail/user-detail.component.html b/console/src/app/pages/user-detail/user-detail/user-detail.component.html index dd83a0779b..db30ace546 100644 --- a/console/src/app/pages/user-detail/user-detail/user-detail.component.html +++ b/console/src/app/pages/user-detail/user-detail/user-detail.component.html @@ -188,6 +188,14 @@
+
+
+ Login Names: + {{login}} +
+
+

{{ 'CHANGES.USER.TITLE' | translate }}

diff --git a/console/src/app/pages/user-detail/user-detail/user-detail.component.scss b/console/src/app/pages/user-detail/user-detail/user-detail.component.scss index 447e67fe1a..0341e95282 100644 --- a/console/src/app/pages/user-detail/user-detail/user-detail.component.scss +++ b/console/src/app/pages/user-detail/user-detail/user-detail.component.scss @@ -126,6 +126,63 @@ // display: flex; // flex-direction: column; + .details { + margin-bottom: 1rem; + border-bottom: 1px solid #81868a40; + padding-bottom: 1rem; + + .row { + display: flex; + margin-bottom: 0.5rem; + align-items: center; + + button { + display: none; + visibility: hidden; + } + + &:hover { + button { + display: inline-block; + visibility: visible; + mat-icon { + font-size: 1.2rem; + } + } + } + + .first { + flex: 1; + font-size: 0.8rem; + margin-right: 0.5rem; + white-space: nowrap; + } + + .fill-space { + flex: 1; + } + + .second { + font-size: 0.8rem; + text-overflow: ellipsis; + overflow: hidden; + margin-left: 1rem; + text-align: right; + } + + a { + &:hover { + cursor: pointer; + text-decoration: underline; + } + } + } + + .side-section { + color: #81868a; + } + } + .details { margin-bottom: 1rem; border-bottom: 1px solid #81868a40; diff --git a/console/src/app/pages/user-detail/user-detail/user-detail.component.ts b/console/src/app/pages/user-detail/user-detail/user-detail.component.ts index fea14fe367..ec5e6bd53d 100644 --- a/console/src/app/pages/user-detail/user-detail/user-detail.component.ts +++ b/console/src/app/pages/user-detail/user-detail/user-detail.component.ts @@ -10,12 +10,12 @@ import { Gender, NotificationType, PasswordComplexityPolicy, - User, UserAddress, UserEmail, UserPhone, UserProfile, UserState, + UserView, } from 'src/app/proto/generated/management_pb'; import { AuthUserService } from 'src/app/services/auth-user.service'; import { MgmtUserService } from 'src/app/services/mgmt-user.service'; @@ -45,7 +45,7 @@ function passwordConfirmValidator(c: AbstractControl): any { styleUrls: ['./user-detail.component.scss'], }) export class UserDetailComponent implements OnInit, OnDestroy { - public user!: User.AsObject; + public user!: UserView.AsObject; // public email: UserEmail.AsObject = { email: '' } as any; // public phone: UserPhone.AsObject = { phone: '' } as any; public address: UserAddress.AsObject = { id: '' } as any; diff --git a/console/src/app/proto/generated/auth_grpc_web_pb.d.ts b/console/src/app/proto/generated/auth_grpc_web_pb.d.ts index a87917c087..663897cda9 100644 --- a/console/src/app/proto/generated/auth_grpc_web_pb.d.ts +++ b/console/src/app/proto/generated/auth_grpc_web_pb.d.ts @@ -30,6 +30,7 @@ import { UserProfile, UserProfileView, UserSessionViews, + UserView, VerifyMfaOtp, VerifyMyUserEmailRequest, VerifyUserPhoneRequest} from './auth_pb'; @@ -67,6 +68,13 @@ export class AuthServiceClient { response: UserSessionViews) => void ): grpcWeb.ClientReadableStream; + getMyUser( + request: google_protobuf_empty_pb.Empty, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.Error, + response: UserView) => void + ): grpcWeb.ClientReadableStream; + getMyUserProfile( request: google_protobuf_empty_pb.Empty, metadata: grpcWeb.Metadata | undefined, @@ -234,6 +242,11 @@ export class AuthServicePromiseClient { metadata?: grpcWeb.Metadata ): Promise; + getMyUser( + request: google_protobuf_empty_pb.Empty, + metadata?: grpcWeb.Metadata + ): Promise; + getMyUserProfile( request: google_protobuf_empty_pb.Empty, metadata?: grpcWeb.Metadata diff --git a/console/src/app/proto/generated/auth_grpc_web_pb.js b/console/src/app/proto/generated/auth_grpc_web_pb.js index ca8c8b3f06..021227d2e9 100644 --- a/console/src/app/proto/generated/auth_grpc_web_pb.js +++ b/console/src/app/proto/generated/auth_grpc_web_pb.js @@ -404,6 +404,86 @@ proto.caos.zitadel.auth.api.v1.AuthServicePromiseClient.prototype.getMyUserSessi }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.protobuf.Empty, + * !proto.caos.zitadel.auth.api.v1.UserView>} + */ +const methodDescriptor_AuthService_GetMyUser = new grpc.web.MethodDescriptor( + '/caos.zitadel.auth.api.v1.AuthService/GetMyUser', + grpc.web.MethodType.UNARY, + google_protobuf_empty_pb.Empty, + proto.caos.zitadel.auth.api.v1.UserView, + /** + * @param {!proto.google.protobuf.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.caos.zitadel.auth.api.v1.UserView.deserializeBinary +); + + +/** + * @const + * @type {!grpc.web.AbstractClientBase.MethodInfo< + * !proto.google.protobuf.Empty, + * !proto.caos.zitadel.auth.api.v1.UserView>} + */ +const methodInfo_AuthService_GetMyUser = new grpc.web.AbstractClientBase.MethodInfo( + proto.caos.zitadel.auth.api.v1.UserView, + /** + * @param {!proto.google.protobuf.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.caos.zitadel.auth.api.v1.UserView.deserializeBinary +); + + +/** + * @param {!proto.google.protobuf.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.Error, ?proto.caos.zitadel.auth.api.v1.UserView)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.caos.zitadel.auth.api.v1.AuthServiceClient.prototype.getMyUser = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/caos.zitadel.auth.api.v1.AuthService/GetMyUser', + request, + metadata || {}, + methodDescriptor_AuthService_GetMyUser, + callback); +}; + + +/** + * @param {!proto.google.protobuf.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @return {!Promise} + * A native promise that resolves to the response + */ +proto.caos.zitadel.auth.api.v1.AuthServicePromiseClient.prototype.getMyUser = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/caos.zitadel.auth.api.v1.AuthService/GetMyUser', + request, + metadata || {}, + methodDescriptor_AuthService_GetMyUser); +}; + + /** * @const * @type {!grpc.web.MethodDescriptor< diff --git a/console/src/app/proto/generated/auth_pb.d.ts b/console/src/app/proto/generated/auth_pb.d.ts index 16a372e439..c6e8b0abef 100644 --- a/console/src/app/proto/generated/auth_pb.d.ts +++ b/console/src/app/proto/generated/auth_pb.d.ts @@ -47,6 +47,12 @@ export class UserSessionView extends jspb.Message { getSequence(): number; setSequence(value: number): void; + getLoginName(): string; + setLoginName(value: string): void; + + getDisplayName(): string; + setDisplayName(value: string): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): UserSessionView.AsObject; static toObject(includeInstance: boolean, msg: UserSessionView): UserSessionView.AsObject; @@ -63,10 +69,12 @@ export namespace UserSessionView { userId: string, userName: string, sequence: number, + loginName: string, + displayName: string, } } -export class User extends jspb.Message { +export class UserView extends jspb.Message { getId(): string; setId(value: string): void; @@ -78,11 +86,6 @@ export class User extends jspb.Message { hasCreationDate(): boolean; clearCreationDate(): void; - getActivationDate(): google_protobuf_timestamp_pb.Timestamp | undefined; - setActivationDate(value?: google_protobuf_timestamp_pb.Timestamp): void; - hasActivationDate(): boolean; - clearActivationDate(): void; - getChangeDate(): google_protobuf_timestamp_pb.Timestamp | undefined; setChangeDate(value?: google_protobuf_timestamp_pb.Timestamp): void; hasChangeDate(): boolean; @@ -107,12 +110,12 @@ export class User extends jspb.Message { getLastName(): string; setLastName(value: string): void; - getNickName(): string; - setNickName(value: string): void; - getDisplayName(): string; setDisplayName(value: string): void; + getNickName(): string; + setNickName(value: string): void; + getPreferredLanguage(): string; setPreferredLanguage(value: string): void; @@ -146,12 +149,12 @@ export class User extends jspb.Message { getStreetAddress(): string; setStreetAddress(value: string): void; - getPasswordChangeRequired(): boolean; - setPasswordChangeRequired(value: boolean): void; - getSequence(): number; setSequence(value: number): void; + getResourceOwner(): string; + setResourceOwner(value: string): void; + getLoginNamesList(): Array; setLoginNamesList(value: Array): void; clearLoginNamesList(): void; @@ -161,27 +164,26 @@ export class User extends jspb.Message { setPreferredLoginName(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): User.AsObject; - static toObject(includeInstance: boolean, msg: User): User.AsObject; - static serializeBinaryToWriter(message: User, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): User; - static deserializeBinaryFromReader(message: User, reader: jspb.BinaryReader): User; + toObject(includeInstance?: boolean): UserView.AsObject; + static toObject(includeInstance: boolean, msg: UserView): UserView.AsObject; + static serializeBinaryToWriter(message: UserView, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UserView; + static deserializeBinaryFromReader(message: UserView, reader: jspb.BinaryReader): UserView; } -export namespace User { +export namespace UserView { export type AsObject = { id: string, state: UserState, creationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject, - activationDate?: google_protobuf_timestamp_pb.Timestamp.AsObject, changeDate?: google_protobuf_timestamp_pb.Timestamp.AsObject, lastLogin?: google_protobuf_timestamp_pb.Timestamp.AsObject, passwordChanged?: google_protobuf_timestamp_pb.Timestamp.AsObject, userName: string, firstName: string, lastName: string, - nickName: string, displayName: string, + nickName: string, preferredLanguage: string, gender: Gender, email: string, @@ -193,8 +195,8 @@ export namespace User { postalCode: string, region: string, streetAddress: string, - passwordChangeRequired: boolean, sequence: number, + resourceOwner: string, loginNamesList: Array, preferredLoginName: string, } @@ -1215,7 +1217,7 @@ export enum OIDCResponseType { OIDCRESPONSETYPE_ID_TOKEN_TOKEN = 2, } export enum UserState { - USERSTATE_UNSPECIEFIED = 0, + USERSTATE_UNSPECIFIED = 0, USERSTATE_ACTIVE = 1, USERSTATE_INACTIVE = 2, USERSTATE_DELETED = 3, diff --git a/console/src/app/proto/generated/auth_pb.js b/console/src/app/proto/generated/auth_pb.js index af36c5ff1d..a149891f1a 100644 --- a/console/src/app/proto/generated/auth_pb.js +++ b/console/src/app/proto/generated/auth_pb.js @@ -47,7 +47,6 @@ goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UpdateUserAddressRequest', nul goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UpdateUserEmailRequest', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UpdateUserPhoneRequest', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UpdateUserProfileRequest', null, global); -goog.exportSymbol('proto.caos.zitadel.auth.api.v1.User', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserAddress', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserAddressView', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserEmail', null, global); @@ -65,6 +64,7 @@ goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserSessionState', null, globa goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserSessionView', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserSessionViews', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserState', null, global); +goog.exportSymbol('proto.caos.zitadel.auth.api.v1.UserView', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.VerifyMfaOtp', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.VerifyMyUserEmailRequest', null, global); goog.exportSymbol('proto.caos.zitadel.auth.api.v1.VerifyUserEmailRequest', null, global); @@ -121,16 +121,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.caos.zitadel.auth.api.v1.User = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.caos.zitadel.auth.api.v1.User.repeatedFields_, null); +proto.caos.zitadel.auth.api.v1.UserView = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.caos.zitadel.auth.api.v1.UserView.repeatedFields_, null); }; -goog.inherits(proto.caos.zitadel.auth.api.v1.User, jspb.Message); +goog.inherits(proto.caos.zitadel.auth.api.v1.UserView, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.caos.zitadel.auth.api.v1.User.displayName = 'proto.caos.zitadel.auth.api.v1.User'; + proto.caos.zitadel.auth.api.v1.UserView.displayName = 'proto.caos.zitadel.auth.api.v1.UserView'; } /** * Generated by JsPbCodeGenerator. @@ -993,7 +993,9 @@ proto.caos.zitadel.auth.api.v1.UserSessionView.toObject = function(includeInstan authState: jspb.Message.getFieldWithDefault(msg, 3, 0), userId: jspb.Message.getFieldWithDefault(msg, 4, ""), userName: jspb.Message.getFieldWithDefault(msg, 5, ""), - sequence: jspb.Message.getFieldWithDefault(msg, 6, 0) + sequence: jspb.Message.getFieldWithDefault(msg, 6, 0), + loginName: jspb.Message.getFieldWithDefault(msg, 7, ""), + displayName: jspb.Message.getFieldWithDefault(msg, 8, "") }; if (includeInstance) { @@ -1054,6 +1056,14 @@ proto.caos.zitadel.auth.api.v1.UserSessionView.deserializeBinaryFromReader = fun var value = /** @type {number} */ (reader.readUint64()); msg.setSequence(value); break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setLoginName(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayName(value); + break; default: reader.skipField(); break; @@ -1125,6 +1135,20 @@ proto.caos.zitadel.auth.api.v1.UserSessionView.serializeBinaryToWriter = functio f ); } + f = message.getLoginName(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getDisplayName(); + if (f.length > 0) { + writer.writeString( + 8, + f + ); + } }; @@ -1218,13 +1242,43 @@ proto.caos.zitadel.auth.api.v1.UserSessionView.prototype.setSequence = function( }; +/** + * optional string login_name = 7; + * @return {string} + */ +proto.caos.zitadel.auth.api.v1.UserSessionView.prototype.getLoginName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.caos.zitadel.auth.api.v1.UserSessionView.prototype.setLoginName = function(value) { + jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string display_name = 8; + * @return {string} + */ +proto.caos.zitadel.auth.api.v1.UserSessionView.prototype.getDisplayName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + + +/** @param {string} value */ +proto.caos.zitadel.auth.api.v1.UserSessionView.prototype.setDisplayName = function(value) { + jspb.Message.setProto3StringField(this, 8, value); +}; + + /** * List of repeated fields within this message type. * @private {!Array} * @const */ -proto.caos.zitadel.auth.api.v1.User.repeatedFields_ = [26]; +proto.caos.zitadel.auth.api.v1.UserView.repeatedFields_ = [25]; @@ -1239,8 +1293,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ -proto.caos.zitadel.auth.api.v1.User.prototype.toObject = function(opt_includeInstance) { - return proto.caos.zitadel.auth.api.v1.User.toObject(opt_includeInstance, this); +proto.caos.zitadel.auth.api.v1.UserView.prototype.toObject = function(opt_includeInstance) { + return proto.caos.zitadel.auth.api.v1.UserView.toObject(opt_includeInstance, this); }; @@ -1249,39 +1303,38 @@ proto.caos.zitadel.auth.api.v1.User.prototype.toObject = function(opt_includeIns * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.caos.zitadel.auth.api.v1.User} msg The msg instance to transform. + * @param {!proto.caos.zitadel.auth.api.v1.UserView} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.caos.zitadel.auth.api.v1.User.toObject = function(includeInstance, msg) { +proto.caos.zitadel.auth.api.v1.UserView.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), state: jspb.Message.getFieldWithDefault(msg, 2, 0), creationDate: (f = msg.getCreationDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - activationDate: (f = msg.getActivationDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), changeDate: (f = msg.getChangeDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), lastLogin: (f = msg.getLastLogin()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), passwordChanged: (f = msg.getPasswordChanged()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - userName: jspb.Message.getFieldWithDefault(msg, 8, ""), - firstName: jspb.Message.getFieldWithDefault(msg, 9, ""), - lastName: jspb.Message.getFieldWithDefault(msg, 10, ""), + userName: jspb.Message.getFieldWithDefault(msg, 7, ""), + firstName: jspb.Message.getFieldWithDefault(msg, 8, ""), + lastName: jspb.Message.getFieldWithDefault(msg, 9, ""), + displayName: jspb.Message.getFieldWithDefault(msg, 10, ""), nickName: jspb.Message.getFieldWithDefault(msg, 11, ""), - displayName: jspb.Message.getFieldWithDefault(msg, 12, ""), - preferredLanguage: jspb.Message.getFieldWithDefault(msg, 13, ""), - gender: jspb.Message.getFieldWithDefault(msg, 14, 0), - email: jspb.Message.getFieldWithDefault(msg, 15, ""), - isEmailVerified: jspb.Message.getFieldWithDefault(msg, 16, false), - phone: jspb.Message.getFieldWithDefault(msg, 17, ""), - isPhoneVerified: jspb.Message.getFieldWithDefault(msg, 18, false), - country: jspb.Message.getFieldWithDefault(msg, 19, ""), - locality: jspb.Message.getFieldWithDefault(msg, 20, ""), - postalCode: jspb.Message.getFieldWithDefault(msg, 21, ""), - region: jspb.Message.getFieldWithDefault(msg, 22, ""), - streetAddress: jspb.Message.getFieldWithDefault(msg, 23, ""), - passwordChangeRequired: jspb.Message.getFieldWithDefault(msg, 24, false), - sequence: jspb.Message.getFieldWithDefault(msg, 25, 0), - loginNamesList: jspb.Message.getRepeatedField(msg, 26), - preferredLoginName: jspb.Message.getFieldWithDefault(msg, 27, "") + preferredLanguage: jspb.Message.getFieldWithDefault(msg, 12, ""), + gender: jspb.Message.getFieldWithDefault(msg, 13, 0), + email: jspb.Message.getFieldWithDefault(msg, 14, ""), + isEmailVerified: jspb.Message.getFieldWithDefault(msg, 15, false), + phone: jspb.Message.getFieldWithDefault(msg, 16, ""), + isPhoneVerified: jspb.Message.getFieldWithDefault(msg, 17, false), + country: jspb.Message.getFieldWithDefault(msg, 18, ""), + locality: jspb.Message.getFieldWithDefault(msg, 19, ""), + postalCode: jspb.Message.getFieldWithDefault(msg, 20, ""), + region: jspb.Message.getFieldWithDefault(msg, 21, ""), + streetAddress: jspb.Message.getFieldWithDefault(msg, 22, ""), + sequence: jspb.Message.getFieldWithDefault(msg, 23, 0), + resourceOwner: jspb.Message.getFieldWithDefault(msg, 24, ""), + loginNamesList: jspb.Message.getRepeatedField(msg, 25), + preferredLoginName: jspb.Message.getFieldWithDefault(msg, 26, "") }; if (includeInstance) { @@ -1295,23 +1348,23 @@ proto.caos.zitadel.auth.api.v1.User.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.caos.zitadel.auth.api.v1.User} + * @return {!proto.caos.zitadel.auth.api.v1.UserView} */ -proto.caos.zitadel.auth.api.v1.User.deserializeBinary = function(bytes) { +proto.caos.zitadel.auth.api.v1.UserView.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.caos.zitadel.auth.api.v1.User; - return proto.caos.zitadel.auth.api.v1.User.deserializeBinaryFromReader(msg, reader); + var msg = new proto.caos.zitadel.auth.api.v1.UserView; + return proto.caos.zitadel.auth.api.v1.UserView.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.caos.zitadel.auth.api.v1.User} msg The message object to deserialize into. + * @param {!proto.caos.zitadel.auth.api.v1.UserView} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.caos.zitadel.auth.api.v1.User} + * @return {!proto.caos.zitadel.auth.api.v1.UserView} */ -proto.caos.zitadel.auth.api.v1.User.deserializeBinaryFromReader = function(msg, reader) { +proto.caos.zitadel.auth.api.v1.UserView.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1334,100 +1387,95 @@ proto.caos.zitadel.auth.api.v1.User.deserializeBinaryFromReader = function(msg, case 4: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setActivationDate(value); + msg.setChangeDate(value); break; case 5: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setChangeDate(value); + msg.setLastLogin(value); break; case 6: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastLogin(value); - break; - case 7: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setPasswordChanged(value); break; - case 8: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setUserName(value); break; - case 9: + case 8: var value = /** @type {string} */ (reader.readString()); msg.setFirstName(value); break; - case 10: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setLastName(value); break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayName(value); + break; case 11: var value = /** @type {string} */ (reader.readString()); msg.setNickName(value); break; case 12: - var value = /** @type {string} */ (reader.readString()); - msg.setDisplayName(value); - break; - case 13: var value = /** @type {string} */ (reader.readString()); msg.setPreferredLanguage(value); break; - case 14: + case 13: var value = /** @type {!proto.caos.zitadel.auth.api.v1.Gender} */ (reader.readEnum()); msg.setGender(value); break; - case 15: + case 14: var value = /** @type {string} */ (reader.readString()); msg.setEmail(value); break; - case 16: + case 15: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsEmailVerified(value); break; - case 17: + case 16: var value = /** @type {string} */ (reader.readString()); msg.setPhone(value); break; - case 18: + case 17: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsPhoneVerified(value); break; - case 19: + case 18: var value = /** @type {string} */ (reader.readString()); msg.setCountry(value); break; - case 20: + case 19: var value = /** @type {string} */ (reader.readString()); msg.setLocality(value); break; - case 21: + case 20: var value = /** @type {string} */ (reader.readString()); msg.setPostalCode(value); break; - case 22: + case 21: var value = /** @type {string} */ (reader.readString()); msg.setRegion(value); break; - case 23: + case 22: var value = /** @type {string} */ (reader.readString()); msg.setStreetAddress(value); break; - case 24: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setPasswordChangeRequired(value); - break; - case 25: + case 23: var value = /** @type {number} */ (reader.readUint64()); msg.setSequence(value); break; - case 26: + case 24: + var value = /** @type {string} */ (reader.readString()); + msg.setResourceOwner(value); + break; + case 25: var value = /** @type {string} */ (reader.readString()); msg.addLoginNames(value); break; - case 27: + case 26: var value = /** @type {string} */ (reader.readString()); msg.setPreferredLoginName(value); break; @@ -1444,9 +1492,9 @@ proto.caos.zitadel.auth.api.v1.User.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.caos.zitadel.auth.api.v1.User.prototype.serializeBinary = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter(this, writer); + proto.caos.zitadel.auth.api.v1.UserView.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1454,11 +1502,11 @@ proto.caos.zitadel.auth.api.v1.User.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.caos.zitadel.auth.api.v1.User} message + * @param {!proto.caos.zitadel.auth.api.v1.UserView} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, writer) { +proto.caos.zitadel.auth.api.v1.UserView.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { @@ -1482,7 +1530,7 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getActivationDate(); + f = message.getChangeDate(); if (f != null) { writer.writeMessage( 4, @@ -1490,7 +1538,7 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getChangeDate(); + f = message.getLastLogin(); if (f != null) { writer.writeMessage( 5, @@ -1498,7 +1546,7 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getLastLogin(); + f = message.getPasswordChanged(); if (f != null) { writer.writeMessage( 6, @@ -1506,29 +1554,28 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } - f = message.getPasswordChanged(); - if (f != null) { - writer.writeMessage( - 7, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } f = message.getUserName(); if (f.length > 0) { writer.writeString( - 8, + 7, f ); } f = message.getFirstName(); if (f.length > 0) { writer.writeString( - 9, + 8, f ); } f = message.getLastName(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getDisplayName(); if (f.length > 0) { writer.writeString( 10, @@ -1542,115 +1589,108 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, f ); } - f = message.getDisplayName(); + f = message.getPreferredLanguage(); if (f.length > 0) { writer.writeString( 12, f ); } - f = message.getPreferredLanguage(); - if (f.length > 0) { - writer.writeString( - 13, - f - ); - } f = message.getGender(); if (f !== 0.0) { writer.writeEnum( - 14, + 13, f ); } f = message.getEmail(); if (f.length > 0) { writer.writeString( - 15, + 14, f ); } f = message.getIsEmailVerified(); if (f) { writer.writeBool( - 16, + 15, f ); } f = message.getPhone(); if (f.length > 0) { writer.writeString( - 17, + 16, f ); } f = message.getIsPhoneVerified(); if (f) { writer.writeBool( - 18, + 17, f ); } f = message.getCountry(); if (f.length > 0) { writer.writeString( - 19, + 18, f ); } f = message.getLocality(); if (f.length > 0) { writer.writeString( - 20, + 19, f ); } f = message.getPostalCode(); if (f.length > 0) { writer.writeString( - 21, + 20, f ); } f = message.getRegion(); if (f.length > 0) { writer.writeString( - 22, + 21, f ); } f = message.getStreetAddress(); if (f.length > 0) { writer.writeString( - 23, - f - ); - } - f = message.getPasswordChangeRequired(); - if (f) { - writer.writeBool( - 24, + 22, f ); } f = message.getSequence(); if (f !== 0) { writer.writeUint64( - 25, + 23, + f + ); + } + f = message.getResourceOwner(); + if (f.length > 0) { + writer.writeString( + 24, f ); } f = message.getLoginNamesList(); if (f.length > 0) { writer.writeRepeatedString( - 26, + 25, f ); } f = message.getPreferredLoginName(); if (f.length > 0) { writer.writeString( - 27, + 26, f ); } @@ -1661,13 +1701,13 @@ proto.caos.zitadel.auth.api.v1.User.serializeBinaryToWriter = function(message, * optional string id = 1; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getId = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setId = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; @@ -1676,13 +1716,13 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setId = function(value) { * optional UserState state = 2; * @return {!proto.caos.zitadel.auth.api.v1.UserState} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getState = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getState = function() { return /** @type {!proto.caos.zitadel.auth.api.v1.UserState} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {!proto.caos.zitadel.auth.api.v1.UserState} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setState = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 2, value); }; @@ -1691,14 +1731,14 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setState = function(value) { * optional google.protobuf.Timestamp creation_date = 3; * @return {?proto.google.protobuf.Timestamp} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getCreationDate = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getCreationDate = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setCreationDate = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setCreationDate = function(value) { jspb.Message.setWrapperField(this, 3, value); }; @@ -1706,7 +1746,7 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setCreationDate = function(value) /** * Clears the message field making it undefined. */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearCreationDate = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.clearCreationDate = function() { this.setCreationDate(undefined); }; @@ -1715,23 +1755,23 @@ proto.caos.zitadel.auth.api.v1.User.prototype.clearCreationDate = function() { * Returns whether this field is set. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.hasCreationDate = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.hasCreationDate = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional google.protobuf.Timestamp activation_date = 4; + * optional google.protobuf.Timestamp change_date = 4; * @return {?proto.google.protobuf.Timestamp} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getActivationDate = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getChangeDate = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4)); }; /** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setActivationDate = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setChangeDate = function(value) { jspb.Message.setWrapperField(this, 4, value); }; @@ -1739,40 +1779,7 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setActivationDate = function(value /** * Clears the message field making it undefined. */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearActivationDate = function() { - this.setActivationDate(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.caos.zitadel.auth.api.v1.User.prototype.hasActivationDate = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * optional google.protobuf.Timestamp change_date = 5; - * @return {?proto.google.protobuf.Timestamp} - */ -proto.caos.zitadel.auth.api.v1.User.prototype.getChangeDate = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); -}; - - -/** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setChangeDate = function(value) { - jspb.Message.setWrapperField(this, 5, value); -}; - - -/** - * Clears the message field making it undefined. - */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearChangeDate = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.clearChangeDate = function() { this.setChangeDate(undefined); }; @@ -1781,31 +1788,31 @@ proto.caos.zitadel.auth.api.v1.User.prototype.clearChangeDate = function() { * Returns whether this field is set. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.hasChangeDate = function() { - return jspb.Message.getField(this, 5) != null; +proto.caos.zitadel.auth.api.v1.UserView.prototype.hasChangeDate = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional google.protobuf.Timestamp last_login = 6; + * optional google.protobuf.Timestamp last_login = 5; * @return {?proto.google.protobuf.Timestamp} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getLastLogin = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getLastLogin = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setLastLogin = function(value) { - jspb.Message.setWrapperField(this, 6, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setLastLogin = function(value) { + jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearLastLogin = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.clearLastLogin = function() { this.setLastLogin(undefined); }; @@ -1814,31 +1821,31 @@ proto.caos.zitadel.auth.api.v1.User.prototype.clearLastLogin = function() { * Returns whether this field is set. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.hasLastLogin = function() { - return jspb.Message.getField(this, 6) != null; +proto.caos.zitadel.auth.api.v1.UserView.prototype.hasLastLogin = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * optional google.protobuf.Timestamp password_changed = 7; + * optional google.protobuf.Timestamp password_changed = 6; * @return {?proto.google.protobuf.Timestamp} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPasswordChanged = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getPasswordChanged = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7)); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6)); }; /** @param {?proto.google.protobuf.Timestamp|undefined} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPasswordChanged = function(value) { - jspb.Message.setWrapperField(this, 7, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setPasswordChanged = function(value) { + jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearPasswordChanged = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.clearPasswordChanged = function() { this.setPasswordChanged(undefined); }; @@ -1847,52 +1854,67 @@ proto.caos.zitadel.auth.api.v1.User.prototype.clearPasswordChanged = function() * Returns whether this field is set. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.hasPasswordChanged = function() { - return jspb.Message.getField(this, 7) != null; +proto.caos.zitadel.auth.api.v1.UserView.prototype.hasPasswordChanged = function() { + return jspb.Message.getField(this, 6) != null; }; /** - * optional string user_name = 8; + * optional string user_name = 7; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getUserName = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getUserName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.setUserName = function(value) { + jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional string first_name = 8; + * @return {string} + */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.getFirstName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setUserName = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setFirstName = function(value) { jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional string first_name = 9; + * optional string last_name = 9; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getFirstName = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getLastName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setFirstName = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setLastName = function(value) { jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional string last_name = 10; + * optional string display_name = 10; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getLastName = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getDisplayName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setLastName = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setDisplayName = function(value) { jspb.Message.setProto3StringField(this, 10, value); }; @@ -1901,245 +1923,228 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setLastName = function(value) { * optional string nick_name = 11; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getNickName = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getNickName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setNickName = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setNickName = function(value) { jspb.Message.setProto3StringField(this, 11, value); }; /** - * optional string display_name = 12; + * optional string preferred_language = 12; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getDisplayName = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getPreferredLanguage = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setDisplayName = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setPreferredLanguage = function(value) { jspb.Message.setProto3StringField(this, 12, value); }; /** - * optional string preferred_language = 13; - * @return {string} - */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPreferredLanguage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); -}; - - -/** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPreferredLanguage = function(value) { - jspb.Message.setProto3StringField(this, 13, value); -}; - - -/** - * optional Gender gender = 14; + * optional Gender gender = 13; * @return {!proto.caos.zitadel.auth.api.v1.Gender} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getGender = function() { - return /** @type {!proto.caos.zitadel.auth.api.v1.Gender} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getGender = function() { + return /** @type {!proto.caos.zitadel.auth.api.v1.Gender} */ (jspb.Message.getFieldWithDefault(this, 13, 0)); }; /** @param {!proto.caos.zitadel.auth.api.v1.Gender} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setGender = function(value) { - jspb.Message.setProto3EnumField(this, 14, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setGender = function(value) { + jspb.Message.setProto3EnumField(this, 13, value); }; /** - * optional string email = 15; + * optional string email = 14; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getEmail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getEmail = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 14, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setEmail = function(value) { - jspb.Message.setProto3StringField(this, 15, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setEmail = function(value) { + jspb.Message.setProto3StringField(this, 14, value); }; /** - * optional bool is_email_verified = 16; + * optional bool is_email_verified = 15; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getIsEmailVerified = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 16, false)); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getIsEmailVerified = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 15, false)); }; /** @param {boolean} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setIsEmailVerified = function(value) { - jspb.Message.setProto3BooleanField(this, 16, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setIsEmailVerified = function(value) { + jspb.Message.setProto3BooleanField(this, 15, value); }; /** - * optional string phone = 17; + * optional string phone = 16; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPhone = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, "")); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getPhone = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 16, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPhone = function(value) { - jspb.Message.setProto3StringField(this, 17, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setPhone = function(value) { + jspb.Message.setProto3StringField(this, 16, value); }; /** - * optional bool is_phone_verified = 18; + * optional bool is_phone_verified = 17; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getIsPhoneVerified = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 18, false)); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getIsPhoneVerified = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 17, false)); }; /** @param {boolean} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setIsPhoneVerified = function(value) { - jspb.Message.setProto3BooleanField(this, 18, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setIsPhoneVerified = function(value) { + jspb.Message.setProto3BooleanField(this, 17, value); }; /** - * optional string country = 19; + * optional string country = 18; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getCountry = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getCountry = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, "")); +}; + + +/** @param {string} value */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.setCountry = function(value) { + jspb.Message.setProto3StringField(this, 18, value); +}; + + +/** + * optional string locality = 19; + * @return {string} + */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.getLocality = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 19, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setCountry = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setLocality = function(value) { jspb.Message.setProto3StringField(this, 19, value); }; /** - * optional string locality = 20; + * optional string postal_code = 20; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getLocality = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getPostalCode = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 20, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setLocality = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setPostalCode = function(value) { jspb.Message.setProto3StringField(this, 20, value); }; /** - * optional string postal_code = 21; + * optional string region = 21; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPostalCode = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getRegion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 21, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPostalCode = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setRegion = function(value) { jspb.Message.setProto3StringField(this, 21, value); }; /** - * optional string region = 22; + * optional string street_address = 22; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getRegion = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.getStreetAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 22, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setRegion = function(value) { +proto.caos.zitadel.auth.api.v1.UserView.prototype.setStreetAddress = function(value) { jspb.Message.setProto3StringField(this, 22, value); }; /** - * optional string street_address = 23; - * @return {string} - */ -proto.caos.zitadel.auth.api.v1.User.prototype.getStreetAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 23, "")); -}; - - -/** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setStreetAddress = function(value) { - jspb.Message.setProto3StringField(this, 23, value); -}; - - -/** - * optional bool password_change_required = 24; - * Note that Boolean fields may be set to 0/1 when serialized from a Java server. - * You should avoid comparisons like {@code val === true/false} in those cases. - * @return {boolean} - */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPasswordChangeRequired = function() { - return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 24, false)); -}; - - -/** @param {boolean} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPasswordChangeRequired = function(value) { - jspb.Message.setProto3BooleanField(this, 24, value); -}; - - -/** - * optional uint64 sequence = 25; + * optional uint64 sequence = 23; * @return {number} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getSequence = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getSequence = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 23, 0)); }; /** @param {number} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setSequence = function(value) { - jspb.Message.setProto3IntField(this, 25, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setSequence = function(value) { + jspb.Message.setProto3IntField(this, 23, value); }; /** - * repeated string login_names = 26; + * optional string resource_owner = 24; + * @return {string} + */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.getResourceOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 24, "")); +}; + + +/** @param {string} value */ +proto.caos.zitadel.auth.api.v1.UserView.prototype.setResourceOwner = function(value) { + jspb.Message.setProto3StringField(this, 24, value); +}; + + +/** + * repeated string login_names = 25; * @return {!Array} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getLoginNamesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 26)); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getLoginNamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 25)); }; /** @param {!Array} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setLoginNamesList = function(value) { - jspb.Message.setField(this, 26, value || []); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setLoginNamesList = function(value) { + jspb.Message.setField(this, 25, value || []); }; @@ -2147,31 +2152,31 @@ proto.caos.zitadel.auth.api.v1.User.prototype.setLoginNamesList = function(value * @param {string} value * @param {number=} opt_index */ -proto.caos.zitadel.auth.api.v1.User.prototype.addLoginNames = function(value, opt_index) { - jspb.Message.addToRepeatedField(this, 26, value, opt_index); +proto.caos.zitadel.auth.api.v1.UserView.prototype.addLoginNames = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 25, value, opt_index); }; /** * Clears the list making it empty but non-null. */ -proto.caos.zitadel.auth.api.v1.User.prototype.clearLoginNamesList = function() { +proto.caos.zitadel.auth.api.v1.UserView.prototype.clearLoginNamesList = function() { this.setLoginNamesList([]); }; /** - * optional string preferred_login_name = 27; + * optional string preferred_login_name = 26; * @return {string} */ -proto.caos.zitadel.auth.api.v1.User.prototype.getPreferredLoginName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); +proto.caos.zitadel.auth.api.v1.UserView.prototype.getPreferredLoginName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 26, "")); }; /** @param {string} value */ -proto.caos.zitadel.auth.api.v1.User.prototype.setPreferredLoginName = function(value) { - jspb.Message.setProto3StringField(this, 27, value); +proto.caos.zitadel.auth.api.v1.UserView.prototype.setPreferredLoginName = function(value) { + jspb.Message.setProto3StringField(this, 26, value); }; @@ -9311,7 +9316,7 @@ proto.caos.zitadel.auth.api.v1.OIDCResponseType = { * @enum {number} */ proto.caos.zitadel.auth.api.v1.UserState = { - USERSTATE_UNSPECIEFIED: 0, + USERSTATE_UNSPECIFIED: 0, USERSTATE_ACTIVE: 1, USERSTATE_INACTIVE: 2, USERSTATE_DELETED: 3, diff --git a/console/src/app/proto/generated/management_pb.js b/console/src/app/proto/generated/management_pb.js index 53307d026e..367bf00de0 100644 --- a/console/src/app/proto/generated/management_pb.js +++ b/console/src/app/proto/generated/management_pb.js @@ -6054,7 +6054,7 @@ proto.caos.zitadel.management.api.v1.UserView.toObject = function(includeInstanc sequence: jspb.Message.getFieldWithDefault(msg, 23, 0), resourceOwner: jspb.Message.getFieldWithDefault(msg, 24, ""), loginNamesList: jspb.Message.getRepeatedField(msg, 25), - preferredLoginName: jspb.Message.getFieldWithDefault(msg, 27, "") + preferredLoginName: jspb.Message.getFieldWithDefault(msg, 26, "") }; if (includeInstance) { @@ -6195,7 +6195,7 @@ proto.caos.zitadel.management.api.v1.UserView.deserializeBinaryFromReader = func var value = /** @type {string} */ (reader.readString()); msg.addLoginNames(value); break; - case 27: + case 26: var value = /** @type {string} */ (reader.readString()); msg.setPreferredLoginName(value); break; @@ -6410,7 +6410,7 @@ proto.caos.zitadel.management.api.v1.UserView.serializeBinaryToWriter = function f = message.getPreferredLoginName(); if (f.length > 0) { writer.writeString( - 27, + 26, f ); } @@ -6886,17 +6886,17 @@ proto.caos.zitadel.management.api.v1.UserView.prototype.clearLoginNamesList = fu /** - * optional string preferred_login_name = 27; + * optional string preferred_login_name = 26; * @return {string} */ proto.caos.zitadel.management.api.v1.UserView.prototype.getPreferredLoginName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 27, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 26, "")); }; /** @param {string} value */ proto.caos.zitadel.management.api.v1.UserView.prototype.setPreferredLoginName = function(value) { - jspb.Message.setProto3StringField(this, 27, value); + jspb.Message.setProto3StringField(this, 26, value); }; diff --git a/console/src/app/services/mgmt-user.service.ts b/console/src/app/services/mgmt-user.service.ts index efcc856551..eaefd07c3f 100644 --- a/console/src/app/services/mgmt-user.service.ts +++ b/console/src/app/services/mgmt-user.service.ts @@ -34,6 +34,7 @@ import { UserSearchQuery, UserSearchRequest, UserSearchResponse, + UserView, } from '../proto/generated/management_pb'; import { GrpcBackendService } from './grpc-backend.service'; import { GrpcService, RequestFactory, ResponseMapper } from './grpc.service'; @@ -82,7 +83,7 @@ export class MgmtUserService { ); } - public async GetUserByID(id: string): Promise { + public async GetUserByID(id: string): Promise { const req = new UserID(); req.setId(id); return await this.request( diff --git a/console/src/app/services/org.service.ts b/console/src/app/services/org.service.ts index cf4e42e090..b5e6441e6c 100644 --- a/console/src/app/services/org.service.ts +++ b/console/src/app/services/org.service.ts @@ -4,6 +4,7 @@ import { Metadata } from 'grpc-web'; import { ManagementServicePromiseClient } from '../proto/generated/management_grpc_web_pb'; import { + AddOrgDomainRequest, AddOrgMemberRequest, Iam, Org, @@ -29,6 +30,7 @@ import { PasswordLockoutPolicyUpdate, ProjectGrant, ProjectGrantCreate, + RemoveOrgDomainRequest, RemoveOrgMemberRequest, } from '../proto/generated/management_pb'; import { GrpcBackendService } from './grpc-backend.service'; @@ -74,6 +76,26 @@ export class OrgService { ); } + public async AddMyOrgDomain(domain: string): Promise { + const req: AddOrgDomainRequest = new AddOrgDomainRequest(); + req.setDomain(domain); + return await this.request( + c => c.addMyOrgDomain, + req, + f => f, + ); + } + + public async RemoveMyOrgDomain(domain: string): Promise { + const req: RemoveOrgDomainRequest = new RemoveOrgDomainRequest(); + req.setDomain(domain); + return await this.request( + c => c.removeMyOrgDomain, + req, + f => f, + ); + } + public async SearchMyOrgDomains(offset: number, limit: number, queryList?: OrgDomainSearchQuery[]): Promise { const req: OrgDomainSearchRequest = new OrgDomainSearchRequest(); diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 6d6622f5aa..97996f5de4 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -185,7 +185,7 @@ "LISTDESCRIPTION":"Wählen Sie die Organisation für den neuen Kontext aus!", "ACTIVE":"AKTIV", "CREATE":"Organisation erstellen", - "ORGDETAIL_TITLE":"Geben Sie den Namen und die Domain für die neue Organisatino ein", + "ORGDETAIL_TITLE":"Geben Sie den Namen und die Domain für die neue Organisation ein", "ORGDOMAIN_TITLE":"Organisations Domain Verifikation", "ORGDOMAIN_VERIFICATION":"Stellen Sie Ihre Webdomain bereit und überprüfen Sie deren Besitz indem sie eine Bestätigungsdatei herunterladen und unter der unten angegebenen URL hochladen. Klicken Sie zum Abschluss auf die Schaltfläche, um diese zu überprüfen.", "ORGDOMAIN_VERIFICATION_SKIP":"Sie können die Überprüfung vorerst überspringen und Ihre Organisation weiter erstellen. Um Ihre Organisation jedoch verwenden zu können, muss dieser Schritt abgeschlossen sein!", @@ -193,6 +193,10 @@ "DOWNLOAD_FILE":"File download", "SELECTORGTOOLTIP":"Wähle diese Organisation" }, + "DOMAINS": { + "TITLE":"Domains", + "DESCRIPTION":"Konfigurieren Sie Ihre Domains mit denen sich Ihre Nutzer einloggen können." + }, "STATE": { "0": "nicht definiert", "1": "aktiv", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index da21bc72eb..9ee2c9957d 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -193,6 +193,10 @@ "DOWNLOAD_FILE":"Download file", "SELECTORGTOOLTIP":"Select this organization" }, + "DOMAINS": { + "TITLE":"Domains", + "DESCRIPTION":"Configure your domains on which your users will be registered." + }, "STATE": { "0": "nicht definiert", "1": "aktiv",