mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-14 09:55:12 +00:00
fix: add prompt on oidc rp, fix idp and login policy in console (#769)
* fix: add prompt on oidc rp * fix: add prompt on oidc rp * fix: translation * fix: translation * fix: not existing login policy * fix: login policy * fix: identity provider detail * fix: idp update * fix: idps in login policy * fix: lint * fix: scss * fix: external idps on auth user detail * fix: idp create mapping fields * fix: remove idp provider * fix: angular lint * fix: login policy view * fix: translations
This commit is contained in:
@@ -5,14 +5,6 @@
|
||||
|
||||
<app-iam-policy-grid></app-iam-policy-grid>
|
||||
|
||||
<ng-template appHasRole [appHasRole]="['iam.idp.read']">
|
||||
<app-card title="{{ 'IDP.LIST.TITLE' | translate }}" description="{{ 'IDP.LIST.DESCRIPTION' | translate }}">
|
||||
<app-idp-table [service]="adminService" [serviceType]="PolicyComponentServiceType.ADMIN"
|
||||
[disabled]="(['org.idp.write'] | hasRole | async) == false">
|
||||
</app-idp-table>
|
||||
</app-card>
|
||||
</ng-template>
|
||||
|
||||
<app-card title="{{ 'IAM.VIEWS.TITLE' | translate }}" description="{{ 'IAM.VIEWS.DESCRIPTION' | translate }}">
|
||||
<app-iam-views></app-iam-views>
|
||||
</app-card>
|
||||
@@ -30,4 +22,4 @@
|
||||
(showDetailClicked)="showDetail()" (refreshClicked)="loadMembers()" [disabled]="false">
|
||||
</app-contributors>
|
||||
</div>
|
||||
</app-meta-layout>
|
||||
</app-meta-layout>
|
||||
|
||||
@@ -26,7 +26,6 @@ import { HasRolePipeModule } from 'src/app/pipes/has-role-pipe.module';
|
||||
import { LocalizedDatePipeModule } from 'src/app/pipes/localized-date-pipe.module';
|
||||
import { TimestampToDatePipeModule } from 'src/app/pipes/timestamp-to-date-pipe.module';
|
||||
|
||||
import { IdpTableModule } from '../../modules/idp-table/idp-table.module';
|
||||
import { FailedEventsComponent } from './failed-events/failed-events.component';
|
||||
import { IamPolicyGridComponent } from './iam-policy-grid/iam-policy-grid.component';
|
||||
import { IamRoutingModule } from './iam-routing.module';
|
||||
@@ -38,7 +37,6 @@ import { IamComponent } from './iam.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
IamRoutingModule,
|
||||
IdpTableModule,
|
||||
ChangesModule,
|
||||
CardModule,
|
||||
MatAutocompleteModule,
|
||||
|
||||
@@ -27,14 +27,6 @@
|
||||
</app-card>
|
||||
</ng-container>
|
||||
|
||||
<ng-template appHasRole [appHasRole]="['org.idp.read']">
|
||||
<app-card title="{{ 'IDP.LIST.TITLE' | translate }}" description="{{ 'IDP.LIST.DESCRIPTION' | translate }}">
|
||||
<app-idp-table [service]="mgmtService" [serviceType]="PolicyComponentServiceType.MGMT"
|
||||
[disabled]="(['iam.idp.write'] | hasRole | async) == false">
|
||||
</app-idp-table>
|
||||
</app-card>
|
||||
</ng-template>
|
||||
|
||||
<ng-template appHasRole [appHasRole]="['policy.read']">
|
||||
<app-policy-grid></app-policy-grid>
|
||||
</ng-template>
|
||||
@@ -66,4 +58,4 @@
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
</div>
|
||||
</app-meta-layout>
|
||||
</app-meta-layout>
|
||||
|
||||
@@ -16,7 +16,6 @@ import { HasRoleModule } from 'src/app/directives/has-role/has-role.module';
|
||||
import { MemberCreateDialogModule } from 'src/app/modules/add-member-dialog/member-create-dialog.module';
|
||||
import { CardModule } from 'src/app/modules/card/card.module';
|
||||
import { ContributorsModule } from 'src/app/modules/contributors/contributors.module';
|
||||
import { IdpTableModule } from 'src/app/modules/idp-table/idp-table.module';
|
||||
import { MetaLayoutModule } from 'src/app/modules/meta-layout/meta-layout.module';
|
||||
import { SharedModule } from 'src/app/modules/shared/shared.module';
|
||||
import { WarnDialogModule } from 'src/app/modules/warn-dialog/warn-dialog.module';
|
||||
@@ -41,7 +40,6 @@ import { PolicyGridComponent } from './policy-grid/policy-grid.component';
|
||||
MatFormFieldModule,
|
||||
MatInputModule,
|
||||
MatButtonModule,
|
||||
IdpTableModule,
|
||||
MatDialogModule,
|
||||
CardModule,
|
||||
MatIconModule,
|
||||
|
||||
+6
-1
@@ -32,6 +32,11 @@
|
||||
</app-card>
|
||||
</div>
|
||||
|
||||
<app-card *ngIf="user && user.human && user.id" title="{{ 'USER.EXTERNALIDP.TITLE' | translate }}"
|
||||
description="{{ 'USER.EXTERNALIDP.DESC' | translate }}">
|
||||
<app-external-idps [userId]="user.id" [service]="userService"></app-external-idps>
|
||||
</app-card>
|
||||
|
||||
<app-card *ngIf="user" title="{{ 'USER.LOGINMETHODS.TITLE' | translate }}"
|
||||
description="{{ 'USER.LOGINMETHODS.DESCRIPTION' | translate }}">
|
||||
<div class="method-col">
|
||||
@@ -148,4 +153,4 @@
|
||||
|
||||
<app-changes class="changes" [changeType]="ChangeType.MYUSER" [id]="user.id"></app-changes>
|
||||
</div>
|
||||
</app-meta-layout>
|
||||
</app-meta-layout>
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ export class AuthUserDetailComponent implements OnDestroy {
|
||||
constructor(
|
||||
public translate: TranslateService,
|
||||
private toast: ToastService,
|
||||
private userService: GrpcAuthService,
|
||||
public userService: GrpcAuthService,
|
||||
private dialog: MatDialog,
|
||||
) {
|
||||
this.loading = true;
|
||||
|
||||
@@ -3,12 +3,17 @@ import {MatPaginator, PageEvent} from '@angular/material/paginator';
|
||||
import {MatTableDataSource} from '@angular/material/table';
|
||||
import {
|
||||
ExternalIDPSearchResponse,
|
||||
ExternalIDPView,
|
||||
ExternalIDPView as MgmtExternalIDPView,
|
||||
IdpView as MgmtIdpView,
|
||||
} 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';
|
||||
|
||||
@Component({
|
||||
selector: 'app-external-idps',
|
||||
@@ -16,17 +21,19 @@ import {SelectionModel} from '@angular/cdk/collections';
|
||||
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<ExternalIDPView.AsObject> = new MatTableDataSource<ExternalIDPView.AsObject>();
|
||||
public selection: SelectionModel<ExternalIDPView.AsObject> = new SelectionModel<ExternalIDPView.AsObject>(true, []);
|
||||
public dataSource: MatTableDataSource<MgmtExternalIDPView.AsObject | AuthExternalIDPView.AsObject>
|
||||
= new MatTableDataSource<MgmtExternalIDPView.AsObject | AuthExternalIDPView.AsObject>();
|
||||
public selection: SelectionModel<MgmtExternalIDPView.AsObject | AuthExternalIDPView.AsObject>
|
||||
= new SelectionModel<MgmtExternalIDPView.AsObject | AuthExternalIDPView.AsObject>(true, []);
|
||||
private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
public loading$: Observable<boolean> = this.loadingSubject.asObservable();
|
||||
@Input() public displayedColumns: string[] = [ 'idpConfigId', 'idpName', 'externalUserId', 'externalUserDisplayName'];
|
||||
|
||||
constructor(private mgmtService: ManagementService,
|
||||
private toast: ToastService) { }
|
||||
constructor(private toast: ToastService) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getData(10, 0);
|
||||
@@ -51,7 +58,7 @@ export class ExternalIdpsComponent implements OnInit {
|
||||
private async getData(limit: number, offset: number): Promise<void> {
|
||||
this.loadingSubject.next(true);
|
||||
|
||||
this.mgmtService.SearchExternalIdps(this.userId, limit, offset).then(resp => {
|
||||
this.service.SearchExternalIdps(this.userId, limit, offset).then(resp => {
|
||||
this.externalIdpResult = resp.toObject();
|
||||
this.dataSource.data = this.externalIdpResult.resultList;
|
||||
console.log(this.externalIdpResult.resultList);
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
</app-detail-form>
|
||||
</app-card>
|
||||
|
||||
<app-card *ngIf="user.human && user.id" title="{{ 'USER.EXTERNALIDP.TITLE' | translate }}"
|
||||
<app-card *ngIf="user && user.human && user.id" title="{{ 'USER.EXTERNALIDP.TITLE' | translate }}"
|
||||
description="{{ 'USER.EXTERNALIDP.DESC' | translate }}">
|
||||
<app-external-idps [userId]="user.id"></app-external-idps>
|
||||
<app-external-idps [userId]="user.id" [service]="mgmtService" ></app-external-idps>
|
||||
</app-card>
|
||||
|
||||
<app-card *ngIf="user.machine" title="{{ 'USER.MACHINE.TITLE' | translate }}">
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user