diff --git a/console/angular.json b/console/angular.json index cae11088b..624c36870 100644 --- a/console/angular.json +++ b/console/angular.json @@ -34,9 +34,7 @@ "scripts": [], "allowedCommonJsDependencies": [ "@angular/common/locales/de", - "src/app/proto/generated/*.js", - "src/app/proto/generated/**/*.js", - "src/app/proto/generated/auth_pb", + "src/app/proto/generated/**", "file-saver", "qrcode" ] diff --git a/console/src/app/animations.ts b/console/src/app/animations.ts index ccbfadf2c..acb2ef4e9 100644 --- a/console/src/app/animations.ts +++ b/console/src/app/animations.ts @@ -77,6 +77,38 @@ export const navAnimations: Array = [ ]), ]; + +export const enterAnimations: Array = [ + trigger('appearfade', [ + transition(':enter', [ + style({ + transform: 'scale(.9) translateY(-10%)', + opacity: 0, + }), + animate( + '100ms ease-in-out', + style({ + transform: 'scale(1) translateY(0%)', + opacity: 1, + }), + ), + ]), + transition(':leave', [ + style({ + transform: 'scale(1) translateY(0%)', + opacity: 1, + }), + animate( + '100ms ease-in-out', + style({ + transform: 'scale(.9) translateY(-10%)', + opacity: 0, + }), + ), + ]), + ]), +]; + export const routeAnimations: AnimationTriggerMetadata = trigger('routeAnimations', [ transition('HomePage => AddPage', [ style({ transform: 'translateX(100%)', opacity: 0.5 }), diff --git a/console/src/app/app.component.html b/console/src/app/app.component.html index be75b5629..36c104ab8 100644 --- a/console/src/app/app.component.html +++ b/console/src/app/app.component.html @@ -12,22 +12,31 @@ - - - - + +
+ + +
+ + + + + + - add{{ 'ACTIONS.NEW' | translate }} @@ -85,14 +85,14 @@ - - + \ No newline at end of file diff --git a/console/src/app/modules/idp-table/idp-table.component.scss b/console/src/app/modules/idp-table/idp-table.component.scss index b5f5c2ce7..f90b8aa3e 100644 --- a/console/src/app/modules/idp-table/idp-table.component.scss +++ b/console/src/app/modules/idp-table/idp-table.component.scss @@ -19,14 +19,6 @@ padding-right: 0; } } - - .data-row { - cursor: pointer; - - &:hover { - background-color: #ffffff05; - } - } } } @@ -38,10 +30,6 @@ tr { } } -.add-button { - border-radius: .5rem; -} - .avatar { height: 30px; width: 30px; diff --git a/console/src/app/modules/idp/idp.component.scss b/console/src/app/modules/idp/idp.component.scss index 642e7535c..b09e93986 100644 --- a/console/src/app/modules/idp/idp.component.scss +++ b/console/src/app/modules/idp/idp.component.scss @@ -33,7 +33,6 @@ margin-bottom: 4rem; display: block; padding: .5rem 4rem; - border-radius: .5rem; @media only screen and (max-width: 450px) { margin-top: 1rem; diff --git a/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.scss b/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.scss index deaa9f79e..2ef92e72a 100644 --- a/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.scss +++ b/console/src/app/modules/policies/login-policy/add-idp-dialog/add-idp-dialog.component.scss @@ -18,8 +18,4 @@ .ok-button { margin-left: .5rem; } - - button { - border-radius: .5rem; - } } diff --git a/console/src/app/modules/policies/login-policy/login-policy.component.html b/console/src/app/modules/policies/login-policy/login-policy.component.html index da449627b..fc1a780ee 100644 --- a/console/src/app/modules/policies/login-policy/login-policy.component.html +++ b/console/src/app/modules/policies/login-policy/login-policy.component.html @@ -1,5 +1,5 @@ + [description]="(serviceType==PolicyComponentServiceType.MGMT ? 'ORG.POLICY.LOGIN_POLICY.DESCRIPTIONCREATEMGMT' : PolicyComponentServiceType.ADMIN ? 'ORG.POLICY.LOGIN_POLICY.DESCRIPTIONCREATEADMIN' : '') | translate"> + + + + - + + - + description="{{ 'USER.EXTERNALIDP.DESC' | translate }}"> + {{ 'USER.PROFILE.PASSWORD' | translate }} ********* -
+
chevron_right @@ -69,7 +76,7 @@
-
+
@@ -84,9 +91,8 @@ - +
@@ -110,7 +116,7 @@
-
+
@@ -153,4 +159,4 @@
- + \ No newline at end of file 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 b3ac0b0c9..ce0b8ed02 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 @@ -1,10 +1,21 @@ -.h1 { - margin-top: 0; -} - -.sub { - color: #8795a1; +.header-row { + display: flex; + justify-content: space-between; + align-items: center; margin-bottom: 2rem; + flex-wrap: wrap; + + .h1 { + margin-top: 0; + } + + .sub { + color: #8795a1; + } + + .theme { + min-width: 250px; + } } .login-name-row { @@ -50,7 +61,7 @@ .method-row { display: flex; align-items: center; - justify-content: space-evenly; + justify-content: space-between; padding: .5rem; border-bottom: 1px solid #ffffff20; flex-wrap: wrap; @@ -65,20 +76,16 @@ display: flex; justify-content: flex-end; align-items: center; + flex-direction: column; } .label { - flex: 1; font-size: .9rem; color: #8795a1; } .icon { - margin-right: .5rem; - } - - .submit-button { - border-radius: .5rem; + margin: .5rem; } .verify { @@ -110,13 +117,13 @@ margin: .5rem; } - .theme-card { - max-width: 300px; + // .theme-card { + // max-width: 300px; - @media only screen and (max-width: 450px) { - max-width: none; - } - } + // @media only screen and (max-width: 450px) { + // max-width: none; + // } + // } } .side { diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html index f84c139a6..9f2b0c7ec 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.html @@ -27,7 +27,7 @@ - +
diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.scss index 23d52737e..711b44e18 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.scss +++ b/console/src/app/pages/users/user-detail/auth-user-detail/auth-user-mfa/auth-user-mfa.component.scss @@ -4,7 +4,6 @@ margin: -.5rem; .button { - border-radius: .5rem; margin: .5rem; margin-top: 1rem; diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-card.scss b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-card.scss index 515ec220b..bea3d95cc 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-card.scss +++ b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-card.scss @@ -3,7 +3,7 @@ @mixin theme-card($theme) { /* stylelint-disable */ $primary: map-get($theme, primary); - $primary-dark: mat-color($primary, A800); + $primary-dark: mat-color($primary, A900); /* stylelint-enable */ .theme-conent, diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.html b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.html index 95041c53b..350dc49ff 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.html +++ b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.html @@ -1,17 +1,13 @@
-
-
-
-

Choose a style

-

Pop or subtle. Day or night.
- Customize your interface -

diff --git a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.scss b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.scss index 72a488411..99a21fd27 100644 --- a/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.scss +++ b/console/src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-setting.component.scss @@ -1,5 +1,5 @@ -$dark-background: #2d2e30; -$light-background: #fafafa; +$dark-background: #212224; +$light-background: rgb(220, 220, 220); :root { transition: none; @@ -16,12 +16,12 @@ $light-background: #fafafa; } .circle { + z-index: 1; position: relative; border-radius: 100%; - width: 6rem; - height: 6rem; + width: 60px; + height: 60px; background: linear-gradient(40deg, #ff0080, #ff8c00 70%); - margin: auto; box-shadow: 0 30px 60px rgba(0, 0, 0, .12); } @@ -29,8 +29,8 @@ $light-background: #fafafa; position: absolute; border-radius: 100%; right: 0; - width: 4rem; - height: 4rem; + width: 40px; + height: 40px; background: $light-background; transform: scale(0); transform-origin: top right; @@ -41,20 +41,9 @@ p { font-size: 90%; } -.heading { - font-size: 100%; - font-weight: bolder; - margin: 2rem 0 .2rem 0; -} - -.desc { - font-size: 14px; - color: #8795a1; -} - label, .toggle { - height: 2.8rem; + height: 45px; border-radius: 100px; } @@ -63,7 +52,6 @@ label { background-color: rgba(0, 0, 0, .1); border-radius: 100px; position: relative; - margin: 1rem 0 1rem 0; cursor: pointer; } @@ -78,33 +66,37 @@ label { font-weight: bolder; width: 65%; margin-left: 17.5%; - margin-top: .5%; position: absolute; display: flex; justify-content: space-between; + align-items: center; user-select: none; + height: 60px; + transform: translateY(-7.5px); } [type="checkbox"] { display: none; } -[type="checkbox"]:checked + .theme-app .toggle { - transform: translateX(100%); - background-color: $dark-background; -} +[type="checkbox"]:checked { + .toggle { + transform: translateX(100%); + background-color: $dark-background; + } -[type="checkbox"]:checked + .theme-app .dark { - opacity: 1; -} + .light { + opacity: .5; + } -[type="checkbox"]:checked + .theme-app .light { - opacity: .5; -} + .dark { + opacity: 1; + } -[type="checkbox"]:checked + .theme-app { - background-color: inherit; - color: inherit; + .theme-app { + background-color: inherit; + color: inherit; + } } [type="checkbox"]:checked + .theme-app .crescent { @@ -119,3 +111,8 @@ label { [type="checkbox"]:checked + .theme-app .main-circle { background: linear-gradient(40deg, #8983f7, #a3dafb 70%); } + +[type="checkbox"]:checked + .app .toggle { + transform: translateX(100%); + background-color: #34323d; +} diff --git a/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.html b/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.html index 71b02e2c6..acfbd1e1e 100644 --- a/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.html +++ b/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.html @@ -23,7 +23,6 @@
- +
\ No newline at end of file diff --git a/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.scss b/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.scss index 1e3c555a1..4c5f5bbfa 100644 --- a/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.scss +++ b/console/src/app/pages/users/user-detail/detail-form-machine/detail-form-machine.component.scss @@ -14,8 +14,4 @@ .btn-container { display: flex; justify-content: flex-end; - - .submit-button { - border-radius: .5rem; - } } diff --git a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html index 1cdd1cec8..6d3355136 100644 --- a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html +++ b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.html @@ -1,49 +1,49 @@ + [timestamp]="externalIdpResult?.viewTimestamp" [selection]="selection"> -
- - -
- + + + - - + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + -
+ - - - + + + - - {{ 'USER.EXTERNALIDP.IDPCONFIGID' | translate }} {{idp?.idpConfigId}} {{ 'USER.EXTERNALIDP.IDPCONFIGID' | translate }} {{idp?.idpConfigId}} {{ 'USER.EXTERNALIDP.IDPNAME' | translate }} {{idp?.idpName}} {{ 'USER.EXTERNALIDP.IDPNAME' | translate }} {{idp?.idpName}} {{ 'USER.EXTERNALIDP.USERDISPLAYNAME' | translate }} {{idp?.externalUserDisplayName}} {{ 'USER.EXTERNALIDP.USERDISPLAYNAME' | translate }} {{idp?.externalUserDisplayName}} {{ 'USER.EXTERNALIDP.EXTERNALUSERID' | translate }} {{idp?.externalUserId}} {{ 'USER.EXTERNALIDP.EXTERNALUSERID' | translate }} {{idp?.externalUserId}}
- - +
+ +
-
+ \ No newline at end of file diff --git a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.scss b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.scss index 073164988..bade0aa75 100644 --- a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.scss +++ b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.scss @@ -19,21 +19,9 @@ padding-right: 0; } } - - .data-row { - cursor: pointer; - - &:hover { - background-color: #ffffff05; - } - } } } tr { outline: none; } - -.add-button { - border-radius: .5rem; -} diff --git a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.ts b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.ts index d64e1cd02..7aec1439f 100644 --- a/console/src/app/pages/users/user-detail/external-idps/external-idps.component.ts +++ b/console/src/app/pages/users/user-detail/external-idps/external-idps.component.ts @@ -1,75 +1,99 @@ -import {Component, Input, OnInit, ViewChild} from '@angular/core'; -import {MatPaginator, PageEvent} from '@angular/material/paginator'; -import {MatTableDataSource} from '@angular/material/table'; +import { SelectionModel } from '@angular/cdk/collections'; +import { Component, Input, OnInit, ViewChild } from '@angular/core'; +import { MatPaginator, PageEvent } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; +import { BehaviorSubject, Observable } from 'rxjs'; + +import { ExternalIDPView as AuthExternalIDPView } from '../../../../proto/generated/auth_pb'; import { - ExternalIDPSearchResponse, - ExternalIDPView as MgmtExternalIDPView, - IdpView as MgmtIdpView, + ExternalIDPSearchResponse, + ExternalIDPView as MgmtExternalIDPView, } from '../../../../proto/generated/management_pb'; -import { - ExternalIDPView as AuthExternalIDPView, -} from '../../../../proto/generated/auth_pb'; -import {BehaviorSubject, Observable} from 'rxjs'; -import {ManagementService} from '../../../../services/mgmt.service'; -import {ToastService} from '../../../../services/toast.service'; -import {SelectionModel} from '@angular/cdk/collections'; -import {GrpcAuthService} from '../../../../services/grpc-auth.service'; +import { GrpcAuthService } from '../../../../services/grpc-auth.service'; +import { ManagementService } from '../../../../services/mgmt.service'; +import { ToastService } from '../../../../services/toast.service'; @Component({ - selector: 'app-external-idps', - templateUrl: './external-idps.component.html', - styleUrls: ['./external-idps.component.scss'], + selector: 'app-external-idps', + templateUrl: './external-idps.component.html', + styleUrls: ['./external-idps.component.scss'], }) export class ExternalIdpsComponent implements OnInit { - @Input() service!: GrpcAuthService | ManagementService; - @Input() userId!: string; - @ViewChild(MatPaginator) public paginator!: MatPaginator; - public externalIdpResult!: ExternalIDPSearchResponse.AsObject; - public dataSource: MatTableDataSource - = new MatTableDataSource(); - public selection: SelectionModel - = new SelectionModel(true, []); - private loadingSubject: BehaviorSubject = new BehaviorSubject(false); - public loading$: Observable = this.loadingSubject.asObservable(); - @Input() public displayedColumns: string[] = [ 'idpConfigId', 'idpName', 'externalUserId', 'externalUserDisplayName']; + @Input() service!: GrpcAuthService | ManagementService; + @Input() userId!: string; + @ViewChild(MatPaginator) public paginator!: MatPaginator; + public externalIdpResult!: ExternalIDPSearchResponse.AsObject; + public dataSource: MatTableDataSource + = new MatTableDataSource(); + public selection: SelectionModel + = new SelectionModel(true, []); + private loadingSubject: BehaviorSubject = new BehaviorSubject(false); + public loading$: Observable = this.loadingSubject.asObservable(); + @Input() public displayedColumns: string[] = ['idpConfigId', 'idpName', 'externalUserId', 'externalUserDisplayName']; - constructor(private toast: ToastService) { } + constructor(private toast: ToastService) { } - ngOnInit(): void { - this.getData(10, 0); - } + ngOnInit(): void { + this.getData(10, 0); + } - public isAllSelected(): boolean { - const numSelected = this.selection.selected.length; - const numRows = this.dataSource.data.length; - return numSelected === numRows; - } + public isAllSelected(): boolean { + const numSelected = this.selection.selected.length; + const numRows = this.dataSource.data.length; + return numSelected === numRows; + } - public masterToggle(): void { - this.isAllSelected() ? - this.selection.clear() : - this.dataSource.data.forEach(row => this.selection.select(row)); - } + public masterToggle(): void { + this.isAllSelected() ? + this.selection.clear() : + this.dataSource.data.forEach(row => this.selection.select(row)); + } - public changePage(event: PageEvent): void { - this.getData(event.pageSize, event.pageIndex * event.pageSize); - } + public changePage(event: PageEvent): void { + this.getData(event.pageSize, event.pageIndex * event.pageSize); + } - private async getData(limit: number, offset: number): Promise { - this.loadingSubject.next(true); + private async getData(limit: number, offset: number): Promise { + this.loadingSubject.next(true); - this.service.SearchExternalIdps(this.userId, limit, offset).then(resp => { - this.externalIdpResult = resp.toObject(); - this.dataSource.data = this.externalIdpResult.resultList; - console.log(this.externalIdpResult.resultList); - this.loadingSubject.next(false); - }).catch((error: any) => { - this.toast.showError(error); - this.loadingSubject.next(false); - }); - } + let promise; + if (this.service instanceof ManagementService) { + promise = (this.service as ManagementService).SearchUserExternalIDPs(limit, offset, this.userId); + } else if (this.service instanceof GrpcAuthService) { + promise = (this.service as GrpcAuthService).SearchMyExternalIdps(limit, offset); + } - public refreshPage(): void { - this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize); - } + if (promise) { + promise.then(resp => { + this.externalIdpResult = resp.toObject(); + this.dataSource.data = this.externalIdpResult.resultList; + console.log(this.externalIdpResult.resultList); + this.loadingSubject.next(false); + }).catch((error: any) => { + this.toast.showError(error); + this.loadingSubject.next(false); + }); + } + } + + public refreshPage(): void { + this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize); + } + + public removeExternalIdp(idp: AuthExternalIDPView.AsObject | MgmtExternalIDPView.AsObject): void { + let promise; + if (this.service instanceof ManagementService) { + promise = (this.service as ManagementService).RemoveExternalIDP(idp.externalUserId, idp.idpConfigId, idp.userId); + } else if (this.service instanceof GrpcAuthService) { + promise = (this.service as GrpcAuthService).RemoveExternalIDP(idp.externalUserId, idp.idpConfigId); + } + + if (promise) { + promise.then(_ => { + this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize); + }).catch((error: any) => { + this.toast.showError(error); + }); + } + } } diff --git a/console/src/app/pages/users/user-detail/machine-keys/add-key-dialog/add-key-dialog.component.scss b/console/src/app/pages/users/user-detail/machine-keys/add-key-dialog/add-key-dialog.component.scss index 91a03f5bc..48211d84a 100644 --- a/console/src/app/pages/users/user-detail/machine-keys/add-key-dialog/add-key-dialog.component.scss +++ b/console/src/app/pages/users/user-detail/machine-keys/add-key-dialog/add-key-dialog.component.scss @@ -19,8 +19,4 @@ .ok-button { margin-left: .5rem; } - - button { - border-radius: .5rem; - } } diff --git a/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.html b/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.html index 68f6d1b28..30ffa383e 100644 --- a/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.html +++ b/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.html @@ -6,8 +6,8 @@ mat-icon-button *ngIf="selection.hasValue()"> - + add{{ 'ACTIONS.NEW' | translate }} @@ -54,7 +54,7 @@ - diff --git a/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.scss b/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.scss index 073164988..bade0aa75 100644 --- a/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.scss +++ b/console/src/app/pages/users/user-detail/machine-keys/machine-keys.component.scss @@ -19,21 +19,9 @@ padding-right: 0; } } - - .data-row { - cursor: pointer; - - &:hover { - background-color: #ffffff05; - } - } } } tr { outline: none; } - -.add-button { - border-radius: .5rem; -} diff --git a/console/src/app/pages/users/user-detail/machine-keys/show-key-dialog/show-key-dialog.component.scss b/console/src/app/pages/users/user-detail/machine-keys/show-key-dialog/show-key-dialog.component.scss index b3912e201..f4ade9076 100644 --- a/console/src/app/pages/users/user-detail/machine-keys/show-key-dialog/show-key-dialog.component.scss +++ b/console/src/app/pages/users/user-detail/machine-keys/show-key-dialog/show-key-dialog.component.scss @@ -19,10 +19,6 @@ .ok-button { margin-left: .5rem; } - - button { - border-radius: .5rem; - } } .row { @@ -52,5 +48,4 @@ .download-button { margin-bottom: 1rem; - border-radius: .5rem; } diff --git a/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.html b/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.html index fd2bcf322..38a610520 100644 --- a/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.html +++ b/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.html @@ -4,7 +4,7 @@ - + add{{ 'ACTIONS.NEW' | translate }} @@ -57,7 +57,7 @@ - + diff --git a/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.scss b/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.scss index 348114fa8..6f3cf2fdc 100644 --- a/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.scss +++ b/console/src/app/pages/users/user-detail/membership-detail/membership-detail.component.scss @@ -1,7 +1,3 @@ -.add-button { - border-radius: .5rem; -} - .refresh-table { width: 100%; } @@ -32,12 +28,6 @@ width: 40px; } - .data-row { - &:hover { - background-color: #ffffff05; - } - } - .selection { width: 50px; max-width: 50px; diff --git a/console/src/app/pages/users/user-detail/password/password.component.scss b/console/src/app/pages/users/user-detail/password/password.component.scss index d55544ff7..367b76466 100644 --- a/console/src/app/pages/users/user-detail/password/password.component.scss +++ b/console/src/app/pages/users/user-detail/password/password.component.scss @@ -26,7 +26,6 @@ margin-top: 100px; display: block; padding: .5rem 4rem; - border-radius: .5rem; } .mat-error { diff --git a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html index 806ffef0e..a1deba12e 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html +++ b/console/src/app/pages/users/user-detail/user-detail/user-detail.component.html @@ -10,10 +10,8 @@
@@ -43,10 +41,10 @@ - - - + + + {{ 'USER.PROFILE.PASSWORD' | translate }} ****** -
- chevron_right @@ -96,7 +94,7 @@
-
+
@@ -139,7 +137,7 @@
-
+
- + \ No newline at end of file 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 0606ca3fa..42288edd7 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 @@ -17,16 +17,6 @@ .fill-space { flex: 1; } - - .state-button { - border-radius: .5rem; - } -} - -.card-actions { - button { - border-radius: .5rem; - } } .method-col { @@ -37,7 +27,7 @@ .method-row { display: flex; align-items: center; - justify-content: space-evenly; + justify-content: space-between; padding: .5rem; border-bottom: 1px solid #ffffff20; flex-wrap: wrap; @@ -52,24 +42,16 @@ display: flex; justify-content: flex-end; align-items: center; - - .notify-change-pwd { - border-radius: .5rem; - } + flex-direction: column; } .label { - flex: 1; font-size: .9rem; color: #818a8a; } .icon { - margin-right: .5rem; - } - - .submit-button { - border-radius: .5rem; + margin: .5rem; } .verify { 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 1b7ff8db4..a055b5a22 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 @@ -1,22 +1,22 @@ -import {Location} from '@angular/common'; -import {Component, OnDestroy, OnInit} from '@angular/core'; -import {ActivatedRoute} from '@angular/router'; -import {TranslateService} from '@ngx-translate/core'; -import {Subscription} from 'rxjs'; -import {ChangeType} from 'src/app/modules/changes/changes.component'; +import { Location } from '@angular/common'; +import { Component, OnDestroy, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { TranslateService } from '@ngx-translate/core'; +import { Subscription } from 'rxjs'; +import { ChangeType } from 'src/app/modules/changes/changes.component'; import { - Gender, - MachineResponse, - MachineView, - NotificationType, - UserEmail, - UserPhone, - UserProfile, - UserState, - UserView, + Gender, + MachineResponse, + MachineView, + NotificationType, + UserEmail, + UserPhone, + UserProfile, + UserState, + UserView, } from 'src/app/proto/generated/management_pb'; -import {ManagementService} from 'src/app/services/mgmt.service'; -import {ToastService} from 'src/app/services/toast.service'; +import { ManagementService } from 'src/app/services/mgmt.service'; +import { ToastService } from 'src/app/services/toast.service'; @Component({ selector: 'app-user-detail', @@ -42,9 +42,8 @@ export class UserDetailComponent implements OnInit, OnDestroy { public translate: TranslateService, private route: ActivatedRoute, private toast: ToastService, - private mgmtUserService: ManagementService, + public mgmtUserService: ManagementService, private _location: Location, - public mgmtService: ManagementService, ) { } public ngOnInit(): void { diff --git a/console/src/app/pages/users/user-detail/user-detail/user-mfa/user-mfa.component.html b/console/src/app/pages/users/user-detail/user-detail/user-mfa/user-mfa.component.html index f274b677c..61c2b662c 100644 --- a/console/src/app/pages/users/user-detail/user-detail/user-mfa/user-mfa.component.html +++ b/console/src/app/pages/users/user-detail/user-detail/user-mfa/user-mfa.component.html @@ -18,7 +18,7 @@ - + diff --git a/console/src/app/pages/users/user-list/user-list.module.ts b/console/src/app/pages/users/user-list/user-list.module.ts index 859dcbbac..f9f3159c0 100644 --- a/console/src/app/pages/users/user-list/user-list.module.ts +++ b/console/src/app/pages/users/user-list/user-list.module.ts @@ -4,7 +4,9 @@ import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatDialogModule } from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; import { MatIconModule } from '@angular/material/icon'; +import { MatInputModule } from '@angular/material/input'; import { MatPaginatorModule } from '@angular/material/paginator'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatTableModule } from '@angular/material/table'; @@ -46,6 +48,8 @@ import { UserTableComponent } from './user-table/user-table.component'; TranslateModule, SharedModule, RefreshTableModule, + MatFormFieldModule, + MatInputModule, ], exports: [ UserListComponent, 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 f5ca7e97a..366f0ebe2 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 @@ -2,16 +2,22 @@ [timestamp]="userResult?.viewTimestamp" [selection]="selection" [emitRefreshOnPreviousRoute]="refreshOnPreviousRoute"> - - -
+ add{{ 'ACTIONS.NEW' | translate }} @@ -36,17 +42,39 @@ - {{ 'USER.PROFILE.FIRSTNAME' | translate }} + + {{ 'USER.PROFILE.FIRSTNAME' | translate }} + + {{user[userType]?.firstName}} - {{ 'USER.PROFILE.LASTNAME' | translate }} + + {{ 'USER.PROFILE.LASTNAME' | translate }} + + {{user[userType]?.lastName}} + + + {{ 'USER.PROFILE.DISPLAYNAME' | translate }} + + + {{user[userType]?.displayName}} + + - {{ 'USER.MACHINE.NAME' | translate }} + + {{ 'USER.MACHINE.NAME' | translate }} + {{user[userType]?.name}} @@ -56,12 +84,22 @@ - {{ 'USER.PROFILE.USERNAME' | translate }} + + {{ 'USER.PROFILE.USERNAME' | translate }} + + {{user.userName}} - {{ 'USER.EMAIL' | translate }} + + {{ 'USER.EMAIL' | translate }} + + {{user[userType]?.email}} @@ -70,7 +108,7 @@ - @@ -78,4 +116,11 @@
- \ No newline at end of file + + + + + \ No newline at end of file diff --git a/console/src/app/pages/users/user-list/user-table/user-table.component.scss b/console/src/app/pages/users/user-list/user-table/user-table.component.scss index 073164988..514a2294f 100644 --- a/console/src/app/pages/users/user-list/user-table/user-table.component.scss +++ b/console/src/app/pages/users/user-list/user-table/user-table.component.scss @@ -19,14 +19,6 @@ padding-right: 0; } } - - .data-row { - cursor: pointer; - - &:hover { - background-color: #ffffff05; - } - } } } @@ -34,6 +26,19 @@ tr { outline: none; } -.add-button { - border-radius: .5rem; +th { + .search-button { + visibility: hidden; + } + + &:hover, + &.search-active { + .search-button { + visibility: visible; + } + } +} + +.filtername { + margin: 0 1rem; } 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 39e8f8608..8c3cd7d00 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 @@ -4,6 +4,7 @@ import { MatPaginator, PageEvent } from '@angular/material/paginator'; import { MatTableDataSource } from '@angular/material/table'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; +import { enterAnimations } from 'src/app/animations'; import { UserView } from 'src/app/proto/generated/auth_pb'; import { SearchMethod, UserSearchKey, UserSearchQuery, UserSearchResponse } from 'src/app/proto/generated/management_pb'; import { ManagementService } from 'src/app/services/mgmt.service'; @@ -15,8 +16,12 @@ import { UserType } from '../user-list.component'; selector: 'app-user-table', templateUrl: './user-table.component.html', styleUrls: ['./user-table.component.scss'], + animations: [ + enterAnimations, + ], }) export class UserTableComponent implements OnInit { + public userSearchKey: UserSearchKey | undefined = undefined; public UserType: any = UserType; @Input() userType: UserType = UserType.HUMAN; @Input() refreshOnPreviousRoute: string = ''; @@ -27,10 +32,10 @@ export class UserTableComponent implements OnInit { public userResult!: UserSearchResponse.AsObject; private loadingSubject: BehaviorSubject = new BehaviorSubject(false); public loading$: Observable = this.loadingSubject.asObservable(); - @Input() public displayedColumns: string[] = ['select', 'firstname', 'lastname', 'username', 'email', 'state']; + @Input() public displayedColumns: string[] = ['select', /*'firstname', 'lastname' ,*/ 'displayName', 'username', 'email', 'state']; @Output() public changedSelection: EventEmitter> = new EventEmitter(); - + UserSearchKey: any = UserSearchKey; constructor(public translate: TranslateService, private userService: ManagementService, private toast: ToastService) { this.selection.changed.subscribe(() => { @@ -77,14 +82,22 @@ export class UserTableComponent implements OnInit { }); } - private async getData(limit: number, offset: number, filterTypeValue: UserType): Promise { + private async getData(limit: number, offset: number, filterTypeValue: UserType, filterName?: string): Promise { this.loadingSubject.next(true); const query = new UserSearchQuery(); query.setKey(UserSearchKey.USERSEARCHKEY_TYPE); query.setMethod(SearchMethod.SEARCHMETHOD_EQUALS); query.setValue(filterTypeValue); - this.userService.SearchUsers(limit, offset, [query]).then(resp => { + let namequery; + if (filterName && this.userSearchKey !== undefined) { + namequery = new UserSearchQuery(); + namequery.setMethod(SearchMethod.SEARCHMETHOD_CONTAINS_IGNORE_CASE); + namequery.setKey(this.userSearchKey); + namequery.setValue(filterName.toLowerCase()); + } + + this.userService.SearchUsers(limit, offset, namequery ? [query, namequery] : [query]).then(resp => { this.userResult = resp.toObject(); this.dataSource.data = this.userResult.resultList; this.loadingSubject.next(false); @@ -97,4 +110,23 @@ export class UserTableComponent implements OnInit { public refreshPage(): void { this.getData(this.paginator.pageSize, this.paginator.pageIndex * this.paginator.pageSize, this.userType); } + + public applyFilter(event: Event): void { + const filterValue = (event.target as HTMLInputElement).value; + this.getData( + this.paginator.pageSize, + this.paginator.pageIndex * this.paginator.pageSize, + this.userType, + filterValue, + ); + } + + public setFilter(key: UserSearchKey): void { + if (this.userSearchKey !== key) { + this.userSearchKey = key; + } else { + this.userSearchKey = undefined; + this.refreshPage(); + } + } } diff --git a/console/src/app/services/admin.service.ts b/console/src/app/services/admin.service.ts index d4b292510..c4482f003 100644 --- a/console/src/app/services/admin.service.ts +++ b/console/src/app/services/admin.service.ts @@ -37,8 +37,8 @@ import { ViewID, Views, } from '../proto/generated/admin_pb'; +import { IdpUpdate } from '../proto/generated/management_pb'; import { GrpcService } from './grpc.service'; -import {IdpUpdate} from '../proto/generated/management_pb'; @Injectable({ providedIn: 'root', @@ -46,7 +46,7 @@ import {IdpUpdate} from '../proto/generated/management_pb'; export class AdminService { constructor(private readonly grpcService: GrpcService) { } - public async SetUpOrg( + public SetUpOrg( createOrgRequest: CreateOrgRequest, humanRequest: CreateHumanRequest, ): Promise { @@ -61,29 +61,29 @@ export class AdminService { return this.grpcService.admin.setUpOrg(req); } - public async GetIamMemberRoles(): Promise { + public GetIamMemberRoles(): Promise { const req = new Empty(); return this.grpcService.admin.getIamMemberRoles(req); } - public async GetViews(): Promise { + public GetViews(): Promise { const req = new Empty(); return this.grpcService.admin.getViews(req); } - public async GetFailedEvents(): Promise { + public GetFailedEvents(): Promise { const req = new Empty(); return this.grpcService.admin.getFailedEvents(req); } - public async ClearView(viewname: string, db: string): Promise { + public ClearView(viewname: string, db: string): Promise { const req: ViewID = new ViewID(); req.setDatabase(db); req.setViewName(viewname); return this.grpcService.admin.clearView(req); } - public async RemoveFailedEvent(viewname: string, db: string, sequence: number): Promise { + public RemoveFailedEvent(viewname: string, db: string, sequence: number): Promise { const req: FailedEventID = new FailedEventID(); req.setDatabase(db); req.setViewName(viewname); @@ -91,29 +91,29 @@ export class AdminService { return this.grpcService.admin.removeFailedEvent(req); } - public async GetDefaultLoginPolicy( + public GetDefaultLoginPolicy( ): Promise { const req = new Empty(); return this.grpcService.admin.getDefaultLoginPolicy(req); } - public async UpdateDefaultLoginPolicy(req: DefaultLoginPolicy): Promise { + public UpdateDefaultLoginPolicy(req: DefaultLoginPolicy): Promise { return this.grpcService.admin.updateDefaultLoginPolicy(req); } - public async AddIdpProviderToDefaultLoginPolicy(configId: string): Promise { + public AddIdpProviderToDefaultLoginPolicy(configId: string): Promise { const req = new IdpProviderID(); req.setIdpConfigId(configId); return this.grpcService.admin.addIdpProviderToDefaultLoginPolicy(req); } - public async RemoveIdpProviderFromDefaultLoginPolicy(configId: string): Promise { + public RemoveIdpProviderFromDefaultLoginPolicy(configId: string): Promise { const req = new IdpProviderID(); req.setIdpConfigId(configId); return this.grpcService.admin.removeIdpProviderFromDefaultLoginPolicy(req); } - public async GetDefaultLoginPolicyIdpProviders(limit?: number, offset?: number): Promise { + public GetDefaultLoginPolicyIdpProviders(limit?: number, offset?: number): Promise { const req = new IdpProviderSearchRequest(); if (limit) { req.setLimit(limit); @@ -124,7 +124,7 @@ export class AdminService { return this.grpcService.admin.getDefaultLoginPolicyIdpProviders(req); } - public async SearchIdps( + public SearchIdps( limit?: number, offset?: number, queryList?: IdpSearchQuery[], @@ -142,7 +142,7 @@ export class AdminService { return this.grpcService.admin.searchIdps(req); } - public async IdpByID( + public IdpByID( id: string, ): Promise { const req = new IdpID(); @@ -150,25 +150,25 @@ export class AdminService { return this.grpcService.admin.idpByID(req); } - public async UpdateIdp( - req: IdpUpdate, + public UpdateIdp( + req: IdpUpdate, ): Promise { - return this.grpcService.admin.updateIdpConfig(req); + return this.grpcService.admin.updateIdpConfig(req); } - public async CreateOidcIdp( + public CreateOidcIdp( req: OidcIdpConfigCreate, ): Promise { return this.grpcService.admin.createOidcIdp(req); } - public async UpdateOidcIdpConfig( + public UpdateOidcIdpConfig( req: OidcIdpConfigUpdate, ): Promise { return this.grpcService.admin.updateOidcIdpConfig(req); } - public async RemoveIdpConfig( + public RemoveIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -176,7 +176,7 @@ export class AdminService { return this.grpcService.admin.removeIdpConfig(req); } - public async DeactivateIdpConfig( + public DeactivateIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -184,7 +184,7 @@ export class AdminService { return this.grpcService.admin.deactivateIdpConfig(req); } - public async ReactivateIdpConfig( + public ReactivateIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -192,7 +192,7 @@ export class AdminService { return this.grpcService.admin.reactivateIdpConfig(req); } - public async SearchIamMembers( + public SearchIamMembers( limit: number, offset: number, queryList?: IamMemberSearchQuery[], @@ -206,7 +206,7 @@ export class AdminService { return this.grpcService.admin.searchIamMembers(req); } - public async RemoveIamMember( + public RemoveIamMember( userId: string, ): Promise { const req = new RemoveIamMemberRequest(); @@ -215,7 +215,7 @@ export class AdminService { return this.grpcService.admin.removeIamMember(req); } - public async AddIamMember( + public AddIamMember( userId: string, rolesList: string[], ): Promise { @@ -226,7 +226,7 @@ export class AdminService { return this.grpcService.admin.addIamMember(req); } - public async ChangeIamMember( + public ChangeIamMember( userId: string, rolesList: string[], ): Promise { @@ -237,14 +237,14 @@ export class AdminService { return this.grpcService.admin.changeIamMember(req); } - public async GetOrgIamPolicy(orgId: string): Promise { + public GetOrgIamPolicy(orgId: string): Promise { const req = new OrgIamPolicyID(); req.setOrgId(orgId); return this.grpcService.admin.getOrgIamPolicy(req); } - public async CreateOrgIamPolicy( + public CreateOrgIamPolicy( orgId: string, description: string, userLoginMustBeDomain: boolean): Promise { @@ -256,7 +256,7 @@ export class AdminService { return this.grpcService.admin.createOrgIamPolicy(req); } - public async UpdateOrgIamPolicy( + public UpdateOrgIamPolicy( orgId: string, description: string, userLoginMustBeDomain: boolean): Promise { @@ -267,7 +267,7 @@ export class AdminService { return this.grpcService.admin.updateOrgIamPolicy(req); } - public async deleteOrgIamPolicy( + public deleteOrgIamPolicy( orgId: string, ): Promise { const req = new OrgIamPolicyID(); diff --git a/console/src/app/services/grpc-auth.service.ts b/console/src/app/services/grpc-auth.service.ts index 29e96e817..3b471e14c 100644 --- a/console/src/app/services/grpc-auth.service.ts +++ b/console/src/app/services/grpc-auth.service.ts @@ -7,6 +7,7 @@ import { catchError, filter, finalize, first, map, mergeMap, switchMap, take, ti import { Changes, ChangesRequest, + ExternalIDPRemoveRequest, ExternalIDPSearchRequest, ExternalIDPSearchResponse, Gender, @@ -163,29 +164,29 @@ export class GrpcAuthService { }) > -1; } - public async GetMyUserProfile(): Promise { + public GetMyUserProfile(): Promise { return this.grpcService.auth.getMyUserProfile(new Empty()); } - public async GetMyPasswordComplexityPolicy(): Promise { + public GetMyPasswordComplexityPolicy(): Promise { return this.grpcService.auth.getMyPasswordComplexityPolicy( new Empty(), ); } - public async GetMyUser(): Promise { + public GetMyUser(): Promise { return this.grpcService.auth.getMyUser( new Empty(), ); } - public async GetMyMfas(): Promise { + public GetMyMfas(): Promise { return this.grpcService.auth.getMyMfas( new Empty(), ); } - public async SearchMyProjectOrgs( + public SearchMyProjectOrgs( limit: number, offset: number, queryList?: MyProjectOrgSearchQuery[], @@ -200,7 +201,7 @@ export class GrpcAuthService { return this.grpcService.auth.searchMyProjectOrgs(req); } - public async SaveMyUserProfile( + public SaveMyUserProfile( firstName?: string, lastName?: string, nickName?: string, @@ -230,76 +231,84 @@ export class GrpcAuthService { return this.zitadelPermissions; } - public async getMyUserSessions(): Promise { + public getMyUserSessions(): Promise { return this.grpcService.auth.getMyUserSessions( new Empty(), ); } - public async GetMyUserEmail(): Promise { + public GetMyUserEmail(): Promise { return this.grpcService.auth.getMyUserEmail( new Empty(), ); } - public async SaveMyUserEmail(email: string): Promise { + public SaveMyUserEmail(email: string): Promise { const req = new UpdateUserEmailRequest(); req.setEmail(email); return this.grpcService.auth.changeMyUserEmail(req); } - public async RemoveMyUserPhone(): Promise { + public RemoveMyUserPhone(): Promise { return this.grpcService.auth.removeMyUserPhone( new Empty(), ); } - public async GetMyzitadelPermissions(): Promise { + public GetMyzitadelPermissions(): Promise { return this.grpcService.auth.getMyZitadelPermissions( new Empty(), ); } - public async GetMyUserPhone(): Promise { + public GetMyUserPhone(): Promise { return this.grpcService.auth.getMyUserPhone( new Empty(), ); } - public async SaveMyUserPhone(phone: string): Promise { + public SaveMyUserPhone(phone: string): Promise { const req = new UpdateUserPhoneRequest(); req.setPhone(phone); return this.grpcService.auth.changeMyUserPhone(req); } - public async GetMyUserAddress(): Promise { + public GetMyUserAddress(): Promise { return this.grpcService.auth.getMyUserAddress( new Empty(), ); } - public async ResendEmailVerification(): Promise { + public ResendEmailVerification(): Promise { const req = new Empty(); return this.grpcService.auth.resendMyEmailVerificationMail(req); } - public async ResendPhoneVerification(): Promise { + public ResendPhoneVerification(): Promise { const req = new Empty(); return this.grpcService.auth.resendMyPhoneVerificationCode(req); } - public async ChangeMyPassword(oldPassword: string, newPassword: string): Promise { + public ChangeMyPassword(oldPassword: string, newPassword: string): Promise { const req = new PasswordChange(); req.setOldPassword(oldPassword); req.setNewPassword(newPassword); return this.grpcService.auth.changeMyPassword(req); } - public async SearchExternalIdps( - userId: string, + public RemoveExternalIDP( + externalUserId: string, + idpConfigId: string, + ): Promise { + const req = new ExternalIDPRemoveRequest(); + req.setExternalUserId(externalUserId); + req.setIdpConfigId(idpConfigId); + return this.grpcService.auth.removeMyExternalIDP(req); + } + + public SearchMyExternalIdps( limit: number, offset: number, - asc?: boolean, ): Promise { const req = new ExternalIDPSearchRequest(); req.setLimit(limit); @@ -307,31 +316,31 @@ export class GrpcAuthService { return this.grpcService.auth.searchMyExternalIDPs(req); } - public async AddMfaOTP(): Promise { + public AddMfaOTP(): Promise { return this.grpcService.auth.addMfaOTP( new Empty(), ); } - public async RemoveMfaOTP(): Promise { + public RemoveMfaOTP(): Promise { return this.grpcService.auth.removeMfaOTP( new Empty(), ); } - public async VerifyMfaOTP(code: string): Promise { + public VerifyMfaOTP(code: string): Promise { const req = new VerifyMfaOtp(); req.setCode(code); return this.grpcService.auth.verifyMfaOTP(req); } - public async VerifyMyUserPhone(code: string): Promise { + public VerifyMyUserPhone(code: string): Promise { const req = new VerifyUserPhoneRequest(); req.setCode(code); return this.grpcService.auth.verifyMyUserPhone(req); } - public async SaveMyUserAddress(address: UserAddress.AsObject): Promise { + public SaveMyUserAddress(address: UserAddress.AsObject): Promise { const req = new UpdateUserAddressRequest(); req.setStreetAddress(address.streetAddress); req.setPostalCode(address.postalCode); @@ -341,7 +350,7 @@ export class GrpcAuthService { return this.grpcService.auth.updateMyUserAddress(req); } - public async GetMyUserChanges(limit: number, sequenceoffset: number): Promise { + public GetMyUserChanges(limit: number, sequenceoffset: number): Promise { const req = new ChangesRequest(); req.setLimit(limit); req.setSequenceOffset(sequenceoffset); diff --git a/console/src/app/services/interceptors/auth.interceptor.ts b/console/src/app/services/interceptors/auth.interceptor.ts index 972591d54..f60939842 100644 --- a/console/src/app/services/interceptors/auth.interceptor.ts +++ b/console/src/app/services/interceptors/auth.interceptor.ts @@ -1,57 +1,57 @@ -import { Injectable } from '@angular/core'; -import { MatDialog } from '@angular/material/dialog'; -import { Request, UnaryInterceptor, UnaryResponse } from 'grpc-web'; -import { filter, first, take } from 'rxjs/operators'; -import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; - -import { AuthenticationService } from '../authentication.service'; -import { StorageService } from '../storage.service'; - - -const authorizationKey = 'Authorization'; -const bearerPrefix = 'Bearer'; -const accessTokenStorageKey = 'access_token'; -@Injectable({ providedIn: 'root' }) -/** - * Set the authentication token - */ -export class AuthInterceptor implements UnaryInterceptor { - constructor( - private authenticationService: AuthenticationService, - private storageService: StorageService, - private dialog: MatDialog, - ) { } - - public async intercept(request: Request, invoker: any): Promise> { - await this.authenticationService.authenticationChanged.pipe( - filter((authed) => !!authed), - first(), - ).toPromise(); - - const metadata = request.getMetadata(); - const accessToken = this.storageService.getItem(accessTokenStorageKey); - metadata[authorizationKey] = `${bearerPrefix} ${accessToken}`; - - return invoker(request).then((response: any) => { - return response; - }).catch((error: any) => { - console.error('error: ', error); - if (error.code === 16) { - const dialogRef = this.dialog.open(WarnDialogComponent, { - data: { - confirmKey: 'ACTIONS.LOGIN', - titleKey: 'ERRORS.TOKENINVALID.TITLE', - descriptionKey: 'ERRORS.TOKENINVALID.DESCRIPTION', - }, - width: '400px', - }); - - dialogRef.afterClosed().pipe(take(1)).subscribe(resp => { - if (resp) { - this.authenticationService.authenticate(undefined, true, true); - } - }); - } - }); - } -} +import { Injectable } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { Request, UnaryInterceptor, UnaryResponse } from 'grpc-web'; +import { filter, first, take } from 'rxjs/operators'; +import { WarnDialogComponent } from 'src/app/modules/warn-dialog/warn-dialog.component'; + +import { AuthenticationService } from '../authentication.service'; +import { StorageService } from '../storage.service'; + + +const authorizationKey = 'Authorization'; +const bearerPrefix = 'Bearer'; +const accessTokenStorageKey = 'access_token'; +@Injectable({ providedIn: 'root' }) +/** + * Set the authentication token + */ +export class AuthInterceptor implements UnaryInterceptor { + constructor( + private authenticationService: AuthenticationService, + private storageService: StorageService, + private dialog: MatDialog, + ) { } + + public async intercept(request: Request, invoker: any): Promise> { + await this.authenticationService.authenticationChanged.pipe( + filter((authed) => !!authed), + first(), + ).toPromise(); + + const metadata = request.getMetadata(); + const accessToken = this.storageService.getItem(accessTokenStorageKey); + metadata[authorizationKey] = `${bearerPrefix} ${accessToken}`; + + return invoker(request).then((response: any) => { + return response; + }).catch((error: any) => { + if (error.code === 16) { + const dialogRef = this.dialog.open(WarnDialogComponent, { + data: { + confirmKey: 'ACTIONS.LOGIN', + titleKey: 'ERRORS.TOKENINVALID.TITLE', + descriptionKey: 'ERRORS.TOKENINVALID.DESCRIPTION', + }, + width: '400px', + }); + + dialogRef.afterClosed().pipe(take(1)).subscribe(resp => { + if (resp) { + this.authenticationService.authenticate(undefined, true, true); + } + }); + } + return Promise.reject(error); + }); + } +} diff --git a/console/src/app/services/mgmt.service.ts b/console/src/app/services/mgmt.service.ts index 3f72ae3c0..3eceaced6 100644 --- a/console/src/app/services/mgmt.service.ts +++ b/console/src/app/services/mgmt.service.ts @@ -3,154 +3,157 @@ import { Empty } from 'google-protobuf/google/protobuf/empty_pb'; import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb'; import { - AddMachineKeyRequest, - AddMachineKeyResponse, - AddOrgDomainRequest, - AddOrgMemberRequest, - Application, - ApplicationID, - ApplicationSearchQuery, - ApplicationSearchRequest, - ApplicationSearchResponse, - ApplicationUpdate, - ApplicationView, - ChangeOrgMemberRequest, - ChangeRequest, - Changes, - CreateHumanRequest, - CreateMachineRequest, - CreateUserRequest, - Domain, ExternalIDPSearchRequest, ExternalIDPSearchResponse, - Gender, - GrantedProjectSearchRequest, - Iam, - Idp, - IdpID, - IdpUpdate, - IdpProviderAdd, - IdpProviderID, - IdpProviderSearchRequest, - IdpProviderSearchResponse, - IdpProviderType, - IdpSearchQuery, - IdpSearchRequest, - IdpSearchResponse, - IdpView, - LoginName, - LoginPolicy, - LoginPolicyView, - MachineKeyIDRequest, - MachineKeySearchRequest, - MachineKeySearchResponse, - MachineKeyType, - MachineResponse, - MultiFactors, - NotificationType, - OIDCApplicationCreate, - OIDCConfig, - OIDCConfigUpdate, - OidcIdpConfig, - OidcIdpConfigCreate, - OidcIdpConfigUpdate, - Org, - OrgCreateRequest, - OrgDomain, - OrgDomainSearchQuery, - OrgDomainSearchRequest, - OrgDomainSearchResponse, - OrgDomainValidationRequest, - OrgDomainValidationResponse, - OrgDomainValidationType, - OrgIamPolicy, - OrgMember, - OrgMemberRoles, - OrgMemberSearchRequest, - OrgMemberSearchResponse, - OrgView, - PasswordAgePolicy, - PasswordAgePolicyCreate, - PasswordAgePolicyID, - PasswordAgePolicyUpdate, - PasswordComplexityPolicy, - PasswordComplexityPolicyCreate, - PasswordComplexityPolicyID, - PasswordComplexityPolicyUpdate, - PasswordLockoutPolicy, - PasswordLockoutPolicyCreate, - PasswordLockoutPolicyID, - PasswordLockoutPolicyUpdate, - PasswordRequest, - PrimaryOrgDomainRequest, - Project, - ProjectCreateRequest, - ProjectGrant, - ProjectGrantCreate, - ProjectGrantID, - ProjectGrantMember, - ProjectGrantMemberAdd, - ProjectGrantMemberChange, - ProjectGrantMemberRemove, - ProjectGrantMemberRoles, - ProjectGrantMemberSearchQuery, - ProjectGrantMemberSearchRequest, - ProjectGrantSearchRequest, - ProjectGrantSearchResponse, - ProjectGrantUpdate, - ProjectGrantView, - ProjectID, - ProjectMember, - ProjectMemberAdd, - ProjectMemberChange, - ProjectMemberRemove, - ProjectMemberRoles, - ProjectMemberSearchQuery, - ProjectMemberSearchRequest, - ProjectMemberSearchResponse, - ProjectRole, - ProjectRoleAdd, - ProjectRoleAddBulk, - ProjectRoleChange, - ProjectRoleRemove, - ProjectRoleSearchQuery, - ProjectRoleSearchRequest, - ProjectRoleSearchResponse, - ProjectSearchQuery, - ProjectSearchRequest, - ProjectSearchResponse, - ProjectUpdateRequest, - ProjectView, - RemoveOrgDomainRequest, - RemoveOrgMemberRequest, - SetPasswordNotificationRequest, - UpdateMachineRequest, - UpdateUserAddressRequest, - UpdateUserEmailRequest, - UpdateUserPhoneRequest, - UpdateUserProfileRequest, - UserAddress, - UserEmail, - UserGrant, - UserGrantCreate, - UserGrantID, - UserGrantRemoveBulk, - UserGrantSearchQuery, - UserGrantSearchRequest, - UserGrantSearchResponse, - UserGrantUpdate, - UserGrantView, - UserID, - UserMembershipSearchQuery, - UserMembershipSearchRequest, - UserMembershipSearchResponse, - UserPhone, - UserProfile, - UserResponse, - UserSearchQuery, - UserSearchRequest, - UserSearchResponse, - UserView, - ValidateOrgDomainRequest, - ZitadelDocs, + AddMachineKeyRequest, + AddMachineKeyResponse, + AddOrgDomainRequest, + AddOrgMemberRequest, + Application, + ApplicationID, + ApplicationSearchQuery, + ApplicationSearchRequest, + ApplicationSearchResponse, + ApplicationUpdate, + ApplicationView, + ChangeOrgMemberRequest, + ChangeRequest, + Changes, + CreateHumanRequest, + CreateMachineRequest, + CreateUserRequest, + Domain, + ExternalIDPRemoveRequest, + ExternalIDPSearchRequest, + ExternalIDPSearchResponse, + Gender, + GrantedProjectSearchRequest, + Iam, + Idp, + IdpID, + IdpProviderAdd, + IdpProviderID, + IdpProviderSearchRequest, + IdpProviderSearchResponse, + IdpProviderType, + IdpSearchQuery, + IdpSearchRequest, + IdpSearchResponse, + IdpUpdate, + IdpView, + LoginName, + LoginPolicy, + LoginPolicyView, + MachineKeyIDRequest, + MachineKeySearchRequest, + MachineKeySearchResponse, + MachineKeyType, + MachineResponse, + MultiFactors, + NotificationType, + OIDCApplicationCreate, + OIDCConfig, + OIDCConfigUpdate, + OidcIdpConfig, + OidcIdpConfigCreate, + OidcIdpConfigUpdate, + Org, + OrgCreateRequest, + OrgDomain, + OrgDomainSearchQuery, + OrgDomainSearchRequest, + OrgDomainSearchResponse, + OrgDomainValidationRequest, + OrgDomainValidationResponse, + OrgDomainValidationType, + OrgIamPolicy, + OrgMember, + OrgMemberRoles, + OrgMemberSearchRequest, + OrgMemberSearchResponse, + OrgView, + PasswordAgePolicy, + PasswordAgePolicyCreate, + PasswordAgePolicyID, + PasswordAgePolicyUpdate, + PasswordComplexityPolicy, + PasswordComplexityPolicyCreate, + PasswordComplexityPolicyID, + PasswordComplexityPolicyUpdate, + PasswordLockoutPolicy, + PasswordLockoutPolicyCreate, + PasswordLockoutPolicyID, + PasswordLockoutPolicyUpdate, + PasswordRequest, + PrimaryOrgDomainRequest, + Project, + ProjectCreateRequest, + ProjectGrant, + ProjectGrantCreate, + ProjectGrantID, + ProjectGrantMember, + ProjectGrantMemberAdd, + ProjectGrantMemberChange, + ProjectGrantMemberRemove, + ProjectGrantMemberRoles, + ProjectGrantMemberSearchQuery, + ProjectGrantMemberSearchRequest, + ProjectGrantSearchRequest, + ProjectGrantSearchResponse, + ProjectGrantUpdate, + ProjectGrantView, + ProjectID, + ProjectMember, + ProjectMemberAdd, + ProjectMemberChange, + ProjectMemberRemove, + ProjectMemberRoles, + ProjectMemberSearchQuery, + ProjectMemberSearchRequest, + ProjectMemberSearchResponse, + ProjectRole, + ProjectRoleAdd, + ProjectRoleAddBulk, + ProjectRoleChange, + ProjectRoleRemove, + ProjectRoleSearchQuery, + ProjectRoleSearchRequest, + ProjectRoleSearchResponse, + ProjectSearchQuery, + ProjectSearchRequest, + ProjectSearchResponse, + ProjectUpdateRequest, + ProjectView, + RemoveOrgDomainRequest, + RemoveOrgMemberRequest, + SetPasswordNotificationRequest, + UpdateMachineRequest, + UpdateUserAddressRequest, + UpdateUserEmailRequest, + UpdateUserPhoneRequest, + UpdateUserProfileRequest, + UserAddress, + UserEmail, + UserGrant, + UserGrantCreate, + UserGrantID, + UserGrantRemoveBulk, + UserGrantSearchQuery, + UserGrantSearchRequest, + UserGrantSearchResponse, + UserGrantUpdate, + UserGrantView, + UserID, + UserMembershipSearchQuery, + UserMembershipSearchRequest, + UserMembershipSearchResponse, + UserPhone, + UserProfile, + UserResponse, + UserSearchQuery, + UserSearchRequest, + UserSearchResponse, + UserView, + ValidateOrgDomainRequest, + ZitadelDocs, } from '../proto/generated/management_pb'; import { GrpcService } from './grpc.service'; @@ -162,7 +165,7 @@ export type ResponseMapper = (resp: TResp) => TMappedResp; export class ManagementService { constructor(private readonly grpcService: GrpcService) { } - public async SearchIdps( + public SearchIdps( limit?: number, offset?: number, queryList?: IdpSearchQuery[], @@ -180,33 +183,33 @@ export class ManagementService { return this.grpcService.mgmt.searchIdps(req); } - public async GetLoginPolicy(): Promise { + public GetLoginPolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getLoginPolicy(req); } - public async UpdateLoginPolicy(req: LoginPolicy): Promise { + public UpdateLoginPolicy(req: LoginPolicy): Promise { return this.grpcService.mgmt.updateLoginPolicy(req); } - public async RemoveLoginPolicy(): Promise { + public RemoveLoginPolicy(): Promise { return this.grpcService.mgmt.removeLoginPolicy(new Empty()); } - public async addIdpProviderToLoginPolicy(configId: string, idpType: IdpProviderType): Promise { + public addIdpProviderToLoginPolicy(configId: string, idpType: IdpProviderType): Promise { const req = new IdpProviderAdd(); req.setIdpProviderType(idpType); req.setIdpConfigId(configId); return this.grpcService.mgmt.addIdpProviderToLoginPolicy(req); } - public async RemoveIdpProviderFromLoginPolicy(configId: string): Promise { + public RemoveIdpProviderFromLoginPolicy(configId: string): Promise { const req = new IdpProviderID(); req.setIdpConfigId(configId); return this.grpcService.mgmt.removeIdpProviderFromLoginPolicy(req); } - public async GetLoginPolicyIdpProviders(limit?: number, offset?: number): Promise { + public GetLoginPolicyIdpProviders(limit?: number, offset?: number): Promise { const req = new IdpProviderSearchRequest(); if (limit) { req.setLimit(limit); @@ -217,7 +220,7 @@ export class ManagementService { return this.grpcService.mgmt.getLoginPolicyIdpProviders(req); } - public async IdpByID( + public IdpByID( id: string, ): Promise { const req = new IdpID(); @@ -225,25 +228,25 @@ export class ManagementService { return this.grpcService.mgmt.idpByID(req); } - public async UpdateIdp( - req: IdpUpdate, + public UpdateIdp( + req: IdpUpdate, ): Promise { - return this.grpcService.mgmt.updateIdpConfig(req); + return this.grpcService.mgmt.updateIdpConfig(req); } - public async CreateOidcIdp( + public CreateOidcIdp( req: OidcIdpConfigCreate, ): Promise { return this.grpcService.mgmt.createOidcIdp(req); } - public async UpdateOidcIdpConfig( + public UpdateOidcIdpConfig( req: OidcIdpConfigUpdate, ): Promise { return this.grpcService.mgmt.updateOidcIdpConfig(req); } - public async RemoveIdpConfig( + public RemoveIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -251,7 +254,7 @@ export class ManagementService { return this.grpcService.mgmt.removeIdpConfig(req); } - public async DeactivateIdpConfig( + public DeactivateIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -259,7 +262,7 @@ export class ManagementService { return this.grpcService.mgmt.deactivateIdpConfig(req); } - public async ReactivateIdpConfig( + public ReactivateIdpConfig( id: string, ): Promise { const req = new IdpID; @@ -267,7 +270,7 @@ export class ManagementService { return this.grpcService.mgmt.reactivateIdpConfig(req); } - public async CreateUserHuman(username: string, user: CreateHumanRequest): Promise { + public CreateUserHuman(username: string, user: CreateHumanRequest): Promise { const req = new CreateUserRequest(); req.setUserName(username); @@ -276,7 +279,7 @@ export class ManagementService { return this.grpcService.mgmt.createUser(req); } - public async CreateUserMachine(username: string, user: CreateMachineRequest): Promise { + public CreateUserMachine(username: string, user: CreateMachineRequest): Promise { const req = new CreateUserRequest(); req.setUserName(username); @@ -285,7 +288,7 @@ export class ManagementService { return this.grpcService.mgmt.createUser(req); } - public async UpdateUserMachine( + public UpdateUserMachine( id: string, description?: string, ): Promise { @@ -297,7 +300,7 @@ export class ManagementService { return this.grpcService.mgmt.updateUserMachine(req); } - public async AddMachineKey( + public AddMachineKey( userId: string, type: MachineKeyType, date?: Timestamp, @@ -311,7 +314,7 @@ export class ManagementService { return this.grpcService.mgmt.addMachineKey(req); } - public async DeleteMachineKey( + public DeleteMachineKey( keyId: string, userId: string, ): Promise { @@ -322,7 +325,7 @@ export class ManagementService { return this.grpcService.mgmt.deleteMachineKey(req); } - public async SearchMachineKeys( + public SearchMachineKeys( userId: string, limit: number, offset: number, @@ -338,46 +341,58 @@ export class ManagementService { return this.grpcService.mgmt.searchMachineKeys(req); } - public async SearchExternalIdps( - userId: string, - limit: number, - offset: number, - asc?: boolean, - ): Promise { - const req = new ExternalIDPSearchRequest(); - req.setUserId(userId); - req.setLimit(limit); - req.setOffset(offset); - return this.grpcService.mgmt.searchUserExternalIDPs(req); + public RemoveExternalIDP( + externalUserId: string, + idpConfigId: string, + userId: string, + ): Promise { + const req = new ExternalIDPRemoveRequest(); + req.setUserId(userId); + req.setExternalUserId(externalUserId); + req.setIdpConfigId(idpConfigId); + return this.grpcService.mgmt.removeExternalIDP(req); } - public async GetIam(): Promise { + + public SearchUserExternalIDPs( + limit: number, + offset: number, + userId: string, + ): Promise { + const req = new ExternalIDPSearchRequest(); + req.setUserId(userId); + req.setLimit(limit); + req.setOffset(offset); + return this.grpcService.mgmt.searchUserExternalIDPs(req); + } + + public GetIam(): Promise { const req = new Empty(); return this.grpcService.mgmt.getIam(req); } - public async GetDefaultPasswordComplexityPolicy(): Promise { + public GetDefaultPasswordComplexityPolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getDefaultPasswordComplexityPolicy(req); } - public async GetMyOrg(): Promise { + public GetMyOrg(): Promise { const req = new Empty(); return this.grpcService.mgmt.getMyOrg(req); } - public async AddMyOrgDomain(domain: string): Promise { + public AddMyOrgDomain(domain: string): Promise { const req: AddOrgDomainRequest = new AddOrgDomainRequest(); req.setDomain(domain); return this.grpcService.mgmt.addMyOrgDomain(req); } - public async RemoveMyOrgDomain(domain: string): Promise { + public RemoveMyOrgDomain(domain: string): Promise { const req: RemoveOrgDomainRequest = new AddOrgDomainRequest(); req.setDomain(domain); return this.grpcService.mgmt.removeMyOrgDomain(req); } - public async SearchMyOrgDomains(offset: number, limit: number, queryList?: OrgDomainSearchQuery[]): + public SearchMyOrgDomains(offset: number, limit: number, queryList?: OrgDomainSearchQuery[]): Promise { const req: OrgDomainSearchRequest = new OrgDomainSearchRequest(); req.setLimit(limit); @@ -389,13 +404,13 @@ export class ManagementService { return this.grpcService.mgmt.searchMyOrgDomains(req); } - public async setMyPrimaryOrgDomain(domain: string): Promise { + public setMyPrimaryOrgDomain(domain: string): Promise { const req: PrimaryOrgDomainRequest = new PrimaryOrgDomainRequest(); req.setDomain(domain); return this.grpcService.mgmt.setMyPrimaryOrgDomain(req); } - public async GenerateMyOrgDomainValidation(domain: string, type: OrgDomainValidationType): + public GenerateMyOrgDomainValidation(domain: string, type: OrgDomainValidationType): Promise { const req: OrgDomainValidationRequest = new OrgDomainValidationRequest(); req.setDomain(domain); @@ -404,7 +419,7 @@ export class ManagementService { return this.grpcService.mgmt.generateMyOrgDomainValidation(req); } - public async ValidateMyOrgDomain(domain: string): + public ValidateMyOrgDomain(domain: string): Promise { const req: ValidateOrgDomainRequest = new ValidateOrgDomainRequest(); req.setDomain(domain); @@ -412,26 +427,26 @@ export class ManagementService { return this.grpcService.mgmt.validateMyOrgDomain(req); } - public async SearchMyOrgMembers(limit: number, offset: number): Promise { + public SearchMyOrgMembers(limit: number, offset: number): Promise { const req = new OrgMemberSearchRequest(); req.setLimit(limit); req.setOffset(offset); return this.grpcService.mgmt.searchMyOrgMembers(req); } - public async getOrgByDomainGlobal(domain: string): Promise { + public getOrgByDomainGlobal(domain: string): Promise { const req = new Domain(); req.setDomain(domain); return this.grpcService.mgmt.getOrgByDomainGlobal(req); } - public async CreateOrg(name: string): Promise { + public CreateOrg(name: string): Promise { const req = new OrgCreateRequest(); req.setName(name); return this.grpcService.mgmt.createOrg(req); } - public async AddMyOrgMember(userId: string, rolesList: string[]): Promise { + public AddMyOrgMember(userId: string, rolesList: string[]): Promise { const req = new AddOrgMemberRequest(); req.setUserId(userId); if (rolesList) { @@ -440,7 +455,7 @@ export class ManagementService { return this.grpcService.mgmt.addMyOrgMember(req); } - public async ChangeMyOrgMember(userId: string, rolesList: string[]): Promise { + public ChangeMyOrgMember(userId: string, rolesList: string[]): Promise { const req = new ChangeOrgMemberRequest(); req.setUserId(userId); req.setRolesList(rolesList); @@ -448,23 +463,23 @@ export class ManagementService { } - public async RemoveMyOrgMember(userId: string): Promise { + public RemoveMyOrgMember(userId: string): Promise { const req = new RemoveOrgMemberRequest(); req.setUserId(userId); return this.grpcService.mgmt.removeMyOrgMember(req); } - public async DeactivateMyOrg(): Promise { + public DeactivateMyOrg(): Promise { const req = new Empty(); return this.grpcService.mgmt.deactivateMyOrg(req); } - public async ReactivateMyOrg(): Promise { + public ReactivateMyOrg(): Promise { const req = new Empty(); return this.grpcService.mgmt.reactivateMyOrg(req); } - public async CreateProjectGrant( + public CreateProjectGrant( orgId: string, projectId: string, roleKeysList: string[], @@ -476,25 +491,25 @@ export class ManagementService { return this.grpcService.mgmt.createProjectGrant(req); } - public async GetOrgMemberRoles(): Promise { + public GetOrgMemberRoles(): Promise { const req = new Empty(); return this.grpcService.mgmt.getOrgMemberRoles(req); } // Policy - public async GetMyOrgIamPolicy(): Promise { + public GetMyOrgIamPolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getMyOrgIamPolicy(req); } - public async GetPasswordAgePolicy(): Promise { + public GetPasswordAgePolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getPasswordAgePolicy(req); } - public async CreatePasswordAgePolicy( + public CreatePasswordAgePolicy( description: string, maxAgeDays: number, expireWarnDays: number, @@ -507,13 +522,13 @@ export class ManagementService { return this.grpcService.mgmt.createPasswordAgePolicy(req); } - public async DeletePasswordAgePolicy(id: string): Promise { + public DeletePasswordAgePolicy(id: string): Promise { const req = new PasswordAgePolicyID(); req.setId(id); return this.grpcService.mgmt.deletePasswordAgePolicy(req); } - public async UpdatePasswordAgePolicy( + public UpdatePasswordAgePolicy( description: string, maxAgeDays: number, expireWarnDays: number, @@ -525,12 +540,12 @@ export class ManagementService { return this.grpcService.mgmt.updatePasswordAgePolicy(req); } - public async GetPasswordComplexityPolicy(): Promise { + public GetPasswordComplexityPolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getPasswordComplexityPolicy(req); } - public async CreatePasswordComplexityPolicy( + public CreatePasswordComplexityPolicy( description: string, hasLowerCase: boolean, hasUpperCase: boolean, @@ -548,13 +563,13 @@ export class ManagementService { return this.grpcService.mgmt.createPasswordComplexityPolicy(req); } - public async DeletePasswordComplexityPolicy(id: string): Promise { + public DeletePasswordComplexityPolicy(id: string): Promise { const req = new PasswordComplexityPolicyID(); req.setId(id); return this.grpcService.mgmt.deletePasswordComplexityPolicy(req); } - public async UpdatePasswordComplexityPolicy( + public UpdatePasswordComplexityPolicy( description: string, hasLowerCase: boolean, hasUpperCase: boolean, @@ -572,13 +587,13 @@ export class ManagementService { return this.grpcService.mgmt.updatePasswordComplexityPolicy(req); } - public async GetPasswordLockoutPolicy(): Promise { + public GetPasswordLockoutPolicy(): Promise { const req = new Empty(); return this.grpcService.mgmt.getPasswordLockoutPolicy(req); } - public async CreatePasswordLockoutPolicy( + public CreatePasswordLockoutPolicy( description: string, maxAttempts: number, showLockoutFailures: boolean, @@ -591,14 +606,14 @@ export class ManagementService { return this.grpcService.mgmt.createPasswordLockoutPolicy(req); } - public async DeletePasswordLockoutPolicy(id: string): Promise { + public DeletePasswordLockoutPolicy(id: string): Promise { const req = new PasswordLockoutPolicyID(); req.setId(id); return this.grpcService.mgmt.deletePasswordLockoutPolicy(req); } - public async UpdatePasswordLockoutPolicy( + public UpdatePasswordLockoutPolicy( description: string, maxAttempts: number, showLockoutFailures: boolean, @@ -622,13 +637,13 @@ export class ManagementService { } } - public async GetUserByID(id: string): Promise { + public GetUserByID(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserByID(req); } - public async SearchProjectMembers( + public SearchProjectMembers( projectId: string, limit: number, offset: number, @@ -644,7 +659,7 @@ export class ManagementService { return this.grpcService.mgmt.searchProjectMembers(req); } - public async SearchUserMemberships(userId: string, + public SearchUserMemberships(userId: string, limit: number, offset: number, queryList?: UserMembershipSearchQuery[]): Promise { const req = new UserMembershipSearchRequest(); req.setLimit(limit); @@ -656,19 +671,19 @@ export class ManagementService { return this.grpcService.mgmt.searchUserMemberships(req); } - public async GetUserProfile(id: string): Promise { + public GetUserProfile(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserProfile(req); } - public async getUserMfas(id: string): Promise { + public getUserMfas(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserMfas(req); } - public async SaveUserProfile( + public SaveUserProfile( id: string, firstName?: string, lastName?: string, @@ -696,45 +711,45 @@ export class ManagementService { return this.grpcService.mgmt.updateUserProfile(req); } - public async GetUserEmail(id: string): Promise { + public GetUserEmail(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserEmail(req); } - public async SaveUserEmail(id: string, email: string): Promise { + public SaveUserEmail(id: string, email: string): Promise { const req = new UpdateUserEmailRequest(); req.setId(id); req.setEmail(email); return this.grpcService.mgmt.changeUserEmail(req); } - public async GetUserPhone(id: string): Promise { + public GetUserPhone(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserPhone(req); } - public async SaveUserPhone(id: string, phone: string): Promise { + public SaveUserPhone(id: string, phone: string): Promise { const req = new UpdateUserPhoneRequest(); req.setId(id); req.setPhone(phone); return this.grpcService.mgmt.changeUserPhone(req); } - public async RemoveUserPhone(id: string): Promise { + public RemoveUserPhone(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.removeUserPhone(req); } - public async DeactivateUser(id: string): Promise { + public DeactivateUser(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.deactivateUser(req); } - public async CreateUserGrant( + public CreateUserGrant( userId: string, roleNamesList: string[], projectId?: string, @@ -749,13 +764,13 @@ export class ManagementService { return this.grpcService.mgmt.createUserGrant(req); } - public async ReactivateUser(id: string): Promise { + public ReactivateUser(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.reactivateUser(req); } - public async AddRole(id: string, key: string, displayName: string, group: string): Promise { + public AddRole(id: string, key: string, displayName: string, group: string): Promise { const req = new ProjectRoleAdd(); req.setId(id); req.setKey(key); @@ -766,39 +781,39 @@ export class ManagementService { return this.grpcService.mgmt.addProjectRole(req); } - public async GetUserAddress(id: string): Promise { + public GetUserAddress(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.getUserAddress(req); } - public async ResendEmailVerification(id: string): Promise { + public ResendEmailVerification(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.resendEmailVerificationMail(req); } - public async ResendPhoneVerification(id: string): Promise { + public ResendPhoneVerification(id: string): Promise { const req = new UserID(); req.setId(id); return this.grpcService.mgmt.resendPhoneVerificationCode(req); } - public async SetInitialPassword(id: string, password: string): Promise { + public SetInitialPassword(id: string, password: string): Promise { const req = new PasswordRequest(); req.setId(id); req.setPassword(password); return this.grpcService.mgmt.setInitialPassword(req); } - public async SendSetPasswordNotification(id: string, type: NotificationType): Promise { + public SendSetPasswordNotification(id: string, type: NotificationType): Promise { const req = new SetPasswordNotificationRequest(); req.setId(id); req.setType(type); return this.grpcService.mgmt.sendSetPasswordNotification(req); } - public async SaveUserAddress(address: UserAddress.AsObject): Promise { + public SaveUserAddress(address: UserAddress.AsObject): Promise { const req = new UpdateUserAddressRequest(); req.setId(address.id); req.setStreetAddress(address.streetAddress); @@ -809,7 +824,7 @@ export class ManagementService { return this.grpcService.mgmt.updateUserAddress(req); } - public async SearchUsers(limit: number, offset: number, queryList?: UserSearchQuery[]): Promise { + public SearchUsers(limit: number, offset: number, queryList?: UserSearchQuery[]): Promise { const req = new UserSearchRequest(); req.setLimit(limit); req.setOffset(offset); @@ -819,7 +834,7 @@ export class ManagementService { return this.grpcService.mgmt.searchUsers(req); } - public async GetUserByLoginNameGlobal(loginname: string): Promise { + public GetUserByLoginNameGlobal(loginname: string): Promise { const req = new LoginName(); req.setLoginName(loginname); return this.grpcService.mgmt.getUserByLoginNameGlobal(req); @@ -827,7 +842,7 @@ export class ManagementService { // USER GRANTS - public async SearchUserGrants( + public SearchUserGrants( limit: number, offset: number, queryList?: UserGrantSearchQuery[], @@ -842,7 +857,7 @@ export class ManagementService { } - public async UserGrantByID( + public UserGrantByID( id: string, userId: string, ): Promise { @@ -853,7 +868,7 @@ export class ManagementService { return this.grpcService.mgmt.userGrantByID(req); } - public async UpdateUserGrant( + public UpdateUserGrant( id: string, userId: string, roleKeysList: string[], @@ -866,7 +881,7 @@ export class ManagementService { return this.grpcService.mgmt.updateUserGrant(req); } - public async RemoveUserGrant( + public RemoveUserGrant( id: string, userId: string, ): Promise { @@ -877,7 +892,7 @@ export class ManagementService { return this.grpcService.mgmt.removeUserGrant(req); } - public async BulkRemoveUserGrant( + public BulkRemoveUserGrant( idsList: string[], ): Promise { const req = new UserGrantRemoveBulk(); @@ -888,7 +903,7 @@ export class ManagementService { // - public async ApplicationChanges(id: string, limit: number, offset: number): Promise { + public ApplicationChanges(id: string, limit: number, offset: number): Promise { const req = new ChangeRequest(); req.setId(id); req.setLimit(limit); @@ -896,7 +911,7 @@ export class ManagementService { return this.grpcService.mgmt.applicationChanges(req); } - public async OrgChanges(id: string, limit: number, offset: number): Promise { + public OrgChanges(id: string, limit: number, offset: number): Promise { const req = new ChangeRequest(); req.setId(id); req.setLimit(limit); @@ -904,7 +919,7 @@ export class ManagementService { return this.grpcService.mgmt.orgChanges(req); } - public async ProjectChanges(id: string, limit: number, offset: number): Promise { + public ProjectChanges(id: string, limit: number, offset: number): Promise { const req = new ChangeRequest(); req.setId(id); req.setLimit(limit); @@ -912,7 +927,7 @@ export class ManagementService { return this.grpcService.mgmt.projectChanges(req); } - public async UserChanges(id: string, limit: number, sequenceoffset: number): Promise { + public UserChanges(id: string, limit: number, sequenceoffset: number): Promise { const req = new ChangeRequest(); req.setId(id); req.setLimit(limit); @@ -922,7 +937,7 @@ export class ManagementService { // project - public async SearchProjects( + public SearchProjects( limit: number, offset: number, queryList?: ProjectSearchQuery[]): Promise { const req = new ProjectSearchRequest(); req.setLimit(limit); @@ -933,7 +948,7 @@ export class ManagementService { return this.grpcService.mgmt.searchProjects(req); } - public async SearchGrantedProjects( + public SearchGrantedProjects( limit: number, offset: number, queryList?: ProjectSearchQuery[]): Promise { const req = new GrantedProjectSearchRequest(); req.setLimit(limit); @@ -945,38 +960,38 @@ export class ManagementService { } - public async GetZitadelDocs(): Promise { + public GetZitadelDocs(): Promise { const req = new Empty(); return this.grpcService.mgmt.getZitadelDocs(req); } - public async GetProjectById(projectId: string): Promise { + public GetProjectById(projectId: string): Promise { const req = new ProjectID(); req.setId(projectId); return this.grpcService.mgmt.projectByID(req); } - public async GetGrantedProjectByID(projectId: string, id: string): Promise { + public GetGrantedProjectByID(projectId: string, id: string): Promise { const req = new ProjectGrantID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.getGrantedProjectByID(req); } - public async CreateProject(project: ProjectCreateRequest.AsObject): Promise { + public CreateProject(project: ProjectCreateRequest.AsObject): Promise { const req = new ProjectCreateRequest(); req.setName(project.name); return this.grpcService.mgmt.createProject(req); } - public async UpdateProject(id: string, name: string): Promise { + public UpdateProject(id: string, name: string): Promise { const req = new ProjectUpdateRequest(); req.setName(name); req.setId(id); return this.grpcService.mgmt.updateProject(req); } - public async UpdateProjectGrant(id: string, projectId: string, rolesList: string[]): Promise { + public UpdateProjectGrant(id: string, projectId: string, rolesList: string[]): Promise { const req = new ProjectGrantUpdate(); req.setRoleKeysList(rolesList); req.setId(id); @@ -984,26 +999,26 @@ export class ManagementService { return this.grpcService.mgmt.updateProjectGrant(req); } - public async RemoveProjectGrant(id: string, projectId: string): Promise { + public RemoveProjectGrant(id: string, projectId: string): Promise { const req = new ProjectGrantID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.removeProjectGrant(req); } - public async DeactivateProject(projectId: string): Promise { + public DeactivateProject(projectId: string): Promise { const req = new ProjectID(); req.setId(projectId); return this.grpcService.mgmt.deactivateProject(req); } - public async ReactivateProject(projectId: string): Promise { + public ReactivateProject(projectId: string): Promise { const req = new ProjectID(); req.setId(projectId); return this.grpcService.mgmt.reactivateProject(req); } - public async SearchProjectGrants(projectId: string, limit: number, offset: number): Promise { + public SearchProjectGrants(projectId: string, limit: number, offset: number): Promise { const req = new ProjectGrantSearchRequest(); req.setProjectId(projectId); req.setLimit(limit); @@ -1011,12 +1026,12 @@ export class ManagementService { return this.grpcService.mgmt.searchProjectGrants(req); } - public async GetProjectGrantMemberRoles(): Promise { + public GetProjectGrantMemberRoles(): Promise { const req = new Empty(); return this.grpcService.mgmt.getProjectGrantMemberRoles(req); } - public async AddProjectMember(id: string, userId: string, rolesList: string[]): Promise { + public AddProjectMember(id: string, userId: string, rolesList: string[]): Promise { const req = new ProjectMemberAdd(); req.setId(id); req.setUserId(userId); @@ -1024,7 +1039,7 @@ export class ManagementService { return this.grpcService.mgmt.addProjectMember(req); } - public async ChangeProjectMember(id: string, userId: string, rolesList: string[]): Promise { + public ChangeProjectMember(id: string, userId: string, rolesList: string[]): Promise { const req = new ProjectMemberChange(); req.setId(id); req.setUserId(userId); @@ -1032,7 +1047,7 @@ export class ManagementService { return this.grpcService.mgmt.changeProjectMember(req); } - public async AddProjectGrantMember( + public AddProjectGrantMember( projectId: string, grantId: string, userId: string, @@ -1046,7 +1061,7 @@ export class ManagementService { return this.grpcService.mgmt.addProjectGrantMember(req); } - public async ChangeProjectGrantMember( + public ChangeProjectGrantMember( projectId: string, grantId: string, userId: string, @@ -1060,7 +1075,7 @@ export class ManagementService { return this.grpcService.mgmt.changeProjectGrantMember(req); } - public async SearchProjectGrantMembers( + public SearchProjectGrantMembers( projectId: string, grantId: string, limit: number, @@ -1078,7 +1093,7 @@ export class ManagementService { return this.grpcService.mgmt.searchProjectGrantMembers(req); } - public async RemoveProjectGrantMember( + public RemoveProjectGrantMember( projectId: string, grantId: string, userId: string, @@ -1090,7 +1105,7 @@ export class ManagementService { return this.grpcService.mgmt.removeProjectGrantMember(req); } - public async ReactivateApplication(projectId: string, appId: string): Promise { + public ReactivateApplication(projectId: string, appId: string): Promise { const req = new ApplicationID(); req.setId(appId); req.setProjectId(projectId); @@ -1098,7 +1113,7 @@ export class ManagementService { return this.grpcService.mgmt.reactivateApplication(req); } - public async DeactivateApplication(projectId: string, appId: string): Promise { + public DeactivateApplication(projectId: string, appId: string): Promise { const req = new ApplicationID(); req.setId(appId); req.setProjectId(projectId); @@ -1106,14 +1121,14 @@ export class ManagementService { return this.grpcService.mgmt.deactivateApplication(req); } - public async RegenerateOIDCClientSecret(id: string, projectId: string): Promise { + public RegenerateOIDCClientSecret(id: string, projectId: string): Promise { const req = new ApplicationID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.regenerateOIDCClientSecret(req); } - public async SearchProjectRoles( + public SearchProjectRoles( projectId: string, limit: number, offset: number, @@ -1129,7 +1144,7 @@ export class ManagementService { return this.grpcService.mgmt.searchProjectRoles(req); } - public async AddProjectRole(role: ProjectRoleAdd.AsObject): Promise { + public AddProjectRole(role: ProjectRoleAdd.AsObject): Promise { const req = new ProjectRoleAdd(); req.setId(role.id); if (role.displayName) { @@ -1140,7 +1155,7 @@ export class ManagementService { return this.grpcService.mgmt.addProjectRole(req); } - public async BulkAddProjectRole( + public BulkAddProjectRole( id: string, rolesList: ProjectRoleAdd[], ): Promise { @@ -1150,7 +1165,7 @@ export class ManagementService { return this.grpcService.mgmt.bulkAddProjectRole(req); } - public async RemoveProjectRole(projectId: string, key: string): Promise { + public RemoveProjectRole(projectId: string, key: string): Promise { const req = new ProjectRoleRemove(); req.setId(projectId); req.setKey(key); @@ -1158,7 +1173,7 @@ export class ManagementService { } - public async ChangeProjectRole(projectId: string, key: string, displayName: string, group: string): + public ChangeProjectRole(projectId: string, key: string, displayName: string, group: string): Promise { const req = new ProjectRoleChange(); req.setId(projectId); @@ -1169,14 +1184,14 @@ export class ManagementService { } - public async RemoveProjectMember(id: string, userId: string): Promise { + public RemoveProjectMember(id: string, userId: string): Promise { const req = new ProjectMemberRemove(); req.setId(id); req.setUserId(userId); return this.grpcService.mgmt.removeProjectMember(req); } - public async SearchApplications( + public SearchApplications( projectId: string, limit: number, offset: number, @@ -1191,47 +1206,47 @@ export class ManagementService { return this.grpcService.mgmt.searchApplications(req); } - public async GetApplicationById(projectId: string, applicationId: string): Promise { + public GetApplicationById(projectId: string, applicationId: string): Promise { const req = new ApplicationID(); req.setProjectId(projectId); req.setId(applicationId); return this.grpcService.mgmt.applicationByID(req); } - public async GetProjectMemberRoles(): Promise { + public GetProjectMemberRoles(): Promise { const req = new Empty(); return this.grpcService.mgmt.getProjectMemberRoles(req); } - public async ProjectGrantByID(id: string, projectId: string): Promise { + public ProjectGrantByID(id: string, projectId: string): Promise { const req = new ProjectGrantID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.projectGrantByID(req); } - public async RemoveProject(id: string): Promise { + public RemoveProject(id: string): Promise { const req = new ProjectID(); req.setId(id); return this.grpcService.mgmt.removeProject(req); } - public async DeactivateProjectGrant(id: string, projectId: string): Promise { + public DeactivateProjectGrant(id: string, projectId: string): Promise { const req = new ProjectGrantID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.deactivateProjectGrant(req); } - public async ReactivateProjectGrant(id: string, projectId: string): Promise { + public ReactivateProjectGrant(id: string, projectId: string): Promise { const req = new ProjectGrantID(); req.setId(id); req.setProjectId(projectId); return this.grpcService.mgmt.reactivateProjectGrant(req); } - public async CreateOIDCApp(app: OIDCApplicationCreate.AsObject): Promise { + public CreateOIDCApp(app: OIDCApplicationCreate.AsObject): Promise { const req = new OIDCApplicationCreate(); req.setProjectId(app.projectId); req.setName(app.name); @@ -1245,7 +1260,7 @@ export class ManagementService { return this.grpcService.mgmt.createOIDCApplication(req); } - public async UpdateApplication(projectId: string, appId: string, name: string): Promise { + public UpdateApplication(projectId: string, appId: string, name: string): Promise { const req = new ApplicationUpdate(); req.setId(appId); req.setName(name); @@ -1253,7 +1268,7 @@ export class ManagementService { return this.grpcService.mgmt.updateApplication(req); } - public async UpdateOIDCAppConfig(projectId: string, + public UpdateOIDCAppConfig(projectId: string, appId: string, oidcConfig: OIDCConfig.AsObject): Promise { const req = new OIDCConfigUpdate(); req.setProjectId(projectId); diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index 55759e914..3759fae0a 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -86,7 +86,19 @@ "COPIED":"In die Zwischenablage kopiert.", "NOUSER":"Kein Benutzer", "REACTIVATE":"Reaktivieren", - "DEACTIVATE":"Deaktivieren" + "DEACTIVATE":"Deaktivieren", + "FILTER":"Filter" + }, + "TABLE":{ + "DEACTIVATE":"Deaktivieren", + "ACTIVATE":"Aktivieren", + "FILTER": { + "1":"Nach Username filtern", + "2":"Nach Vornamen filtern", + "3":"Nach Nachnamen filtern", + "5":"Nach Display Namen filtern", + "6":"Nach Email filtern" + } }, "MFA": { "TABLETYPE":"Typ", @@ -305,7 +317,12 @@ "SEQUENCE":"Sequenz", "TIMESTAMP":"Zeitstempel", "ACTIONS":"Aktionen", - "CLEAR":"Aufräumen" + "CLEAR":"Aufräumen", + "CLEARED":"View wurde erfolgreich zurückgesetzt!", + "DIALOG": { + "VIEW_CLEAR_TITLE": "View zurücksetzen?", + "VIEW_CLEAR_DESCRIPTION":"Sie sind im Begriff eine View zu löschen. Durch das Löschen einer View wird ein Prozess gestartet, bei dem Daten für Endbenutzer möglicherweise nicht oder verzügert verfügbar sind. Sind Sie sicher?" + } }, "FAILEDEVENTS": { "TITLE":"Gescheiterte Events", @@ -319,6 +336,10 @@ "DELETE":"Entfernen", "DELETESUCCESS":"Gescheiterte Events entfernt." }, + "POLICY": { + "TITLE":"Standardrichtlinien für ihre Organisationen", + "DESCRIPTION":"Diese Einstellungen können von Organisationen erweitert und/oder verändert werden." + }, "TOAST":{ "MEMBERREMOVED":"Manager entfernt.", "MEMBERSADDED": "Manager hinzugefügt.", @@ -332,6 +353,10 @@ }, "ORG": { "PAGES": { + "NAME":"Name", + "ID":"ID", + "FILTER":"Filter", + "FILTERPLACEHOLDER":"Filtern Sie nach dem Namen", "LIST": "Organisationen", "LISTDESCRIPTION":"Wähle eine Organisation aus.", "ACTIVE":"Aktiv", diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index 2a544f28a..7e588c49b 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -86,7 +86,19 @@ "COPIED":"Copied to clipboard.", "NOUSER":"No associated users.", "REACTIVATE":"Reactivate", - "DEACTIVATE":"Deactivate" + "DEACTIVATE":"Deactivate", + "FILTER":"Filter" + }, + "TABLE":{ + "DEACTIVATE":"Deactivate", + "ACTIVATE":"Activate", + "FILTER": { + "1":"Filter for Username", + "2":"filter for Firstname", + "3":"filter for Lastname", + "5":"filter for DisplayName", + "6":"filter for email" + } }, "MFA": { "TABLETYPE":"Type", @@ -305,7 +317,12 @@ "SEQUENCE":"Sequence", "TIMESTAMP":"Timestamp", "ACTIONS":"Actions", - "CLEAR":"Clear" + "CLEAR":"Clear", + "CLEARED":"View was successfully cleared!", + "DIALOG": { + "VIEW_CLEAR_TITLE": "Clear View", + "VIEW_CLEAR_DESCRIPTION":"You are about to clear a view. Clearing a view creates a process during which data is possibly not available for endusers. Are you really sure?" + } }, "FAILEDEVENTS": { "TITLE":"Failed Events", @@ -319,6 +336,10 @@ "DELETE":"Remove", "DELETESUCCESS":"Failed events removed." }, + "POLICY": { + "TITLE":"Default policies for organisations", + "DESCRIPTION":"These settings can be enhanced and/or customized by registered organisations." + }, "TOAST":{ "MEMBERREMOVED":"Manager removed.", "MEMBERSADDED": "Managers added.", @@ -332,6 +353,10 @@ }, "ORG": { "PAGES": { + "NAME":"Name", + "ID":"ID", + "FILTER":"Filter", + "FILTERPLACEHOLDER":"Filter for the name", "LIST": "Organisations", "LISTDESCRIPTION":"Choose an organisation.", "ACTIVE":"Active", diff --git a/console/src/component-themes.scss b/console/src/component-themes.scss index 11c9c9a64..e7611f44d 100644 --- a/console/src/component-themes.scss +++ b/console/src/component-themes.scss @@ -8,6 +8,7 @@ @import 'src/app/modules/meta-layout/meta'; @import 'src/app/pages/users/user-detail/auth-user-detail/theme-setting/theme-card'; @import 'src/app/pages/users/user-detail/memberships/memberships.component'; +@import 'src/app/app.component.scss'; @mixin component-themes($theme) { @include avatar-theme($theme); @@ -20,4 +21,5 @@ @include changes-theme($theme); @include meta-theme($theme); @include theme-card($theme); + @include textvar($theme); } diff --git a/console/src/styles.scss b/console/src/styles.scss index fbea0a2f1..cfae460d9 100644 --- a/console/src/styles.scss +++ b/console/src/styles.scss @@ -152,7 +152,9 @@ $custom-typography: @include component-themes($dark-theme); @include angular-material-theme($dark-theme); -.mat-dialog-container { +.mat-dialog-container, +.mat-raised-button, +.mat-stroked-button { border-radius: .5rem !important; } @@ -160,8 +162,6 @@ $custom-typography: @include component-themes($light-theme); @include angular-material-theme($light-theme); - color: #202124; - .sidenav, .main-container, .mat-dialog-container { diff --git a/console/src/styles/sidenav-list.scss b/console/src/styles/sidenav-list.scss index e47cbbc15..1bf23ab4f 100644 --- a/console/src/styles/sidenav-list.scss +++ b/console/src/styles/sidenav-list.scss @@ -7,18 +7,9 @@ $primary-color: mat-color($primary, 500); $accent-color: mat-color($accent, 500); $primary-dark: mat-color($primary, A900); - $inverse-color: mat-color($primary, A600); $sec-dark: mat-color($primary, A800); /* stylelint-enable */ - .mat-menu-item { - &.show-all { - height: 2rem; - line-height: 2rem; - color: mat-color($primary, a700); - } - } - .nav-item { color: inherit; diff --git a/console/src/styles/table.scss b/console/src/styles/table.scss index b6f14c8b0..223ea5e57 100644 --- a/console/src/styles/table.scss +++ b/console/src/styles/table.scss @@ -5,6 +5,7 @@ $primary: map-get($theme, primary); $primary-dark: mat-color($primary, A900); $secondary-dark: mat-color($primary, A800); + $inv-color: mat-color($primary, A600); $foreground: map-get($theme, foreground); .mat-table, @@ -28,4 +29,17 @@ padding-bottom: 0; } } + + tr { + cursor: pointer; + + &.highlight { + &:hover { + td { + // TODO: replace with non transparent color so that columns are not getting overlayed colorwise twice + background-color: rgba($inv-color, .05); + } + } + } + } }