mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 13:58:46 +00:00
feat(console): grpc web interceptors, cleanup services (#631)
* managementservice, authservice, change all refs * refactor grpc auth * fix references * interceptor logic * new interceptor * appinitializers, environment loader, interceptors * remove circular dep * init authconfig in grpc service * authconfig * lint * update mgmt service * fix references * update clientid, fix interceptor * rm unused authconfig * todo auth interceptor
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from
|
||||
import { Router } from '@angular/router';
|
||||
import { Org } from 'src/app/proto/generated/auth_pb';
|
||||
import { ProjectState, ProjectType, ProjectView } from 'src/app/proto/generated/management_pb';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { AuthenticationService } from 'src/app/services/authentication.service';
|
||||
import { StorageKey, StorageService } from 'src/app/services/storage.service';
|
||||
|
||||
@Component({
|
||||
@@ -49,7 +49,7 @@ export class OwnedProjectGridComponent implements OnChanges {
|
||||
public ProjectState: any = ProjectState;
|
||||
public ProjectType: any = ProjectType;
|
||||
|
||||
constructor(private router: Router, private authService: AuthService, private storage: StorageService) {
|
||||
constructor(private router: Router, private authService: AuthenticationService, private storage: StorageService) {
|
||||
this.selection.changed.subscribe(selection => {
|
||||
this.setPrefixedItem('pinned-projects', JSON.stringify(
|
||||
this.selection.selected.map(item => item.projectId),
|
||||
|
||||
+5
-5
@@ -8,7 +8,7 @@ import { TranslateService } from '@ngx-translate/core';
|
||||
import { Timestamp } from 'google-protobuf/google/protobuf/timestamp_pb';
|
||||
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
||||
import { ProjectView } from 'src/app/proto/generated/management_pb';
|
||||
import { ProjectService } from 'src/app/services/project.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
@Component({
|
||||
@@ -56,7 +56,7 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy {
|
||||
|
||||
constructor(private router: Router,
|
||||
public translate: TranslateService,
|
||||
private projectService: ProjectService,
|
||||
private mgmtService: ManagementService,
|
||||
private toast: ToastService,
|
||||
) { }
|
||||
|
||||
@@ -90,7 +90,7 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy {
|
||||
|
||||
private async getData(limit: number, offset: number): Promise<void> {
|
||||
this.loadingSubject.next(true);
|
||||
this.projectService.SearchProjects(limit, offset).then(res => {
|
||||
this.mgmtService.SearchProjects(limit, offset).then(res => {
|
||||
const response = res.toObject();
|
||||
this.ownedProjectList = response.resultList;
|
||||
this.totalResult = response.totalResult;
|
||||
@@ -113,7 +113,7 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy {
|
||||
|
||||
public reactivateSelectedProjects(): void {
|
||||
const promises = this.selection.selected.map(project => {
|
||||
this.projectService.ReactivateProject(project.projectId);
|
||||
this.mgmtService.ReactivateProject(project.projectId);
|
||||
});
|
||||
|
||||
Promise.all(promises).then(() => {
|
||||
@@ -126,7 +126,7 @@ export class OwnedProjectListComponent implements OnInit, OnDestroy {
|
||||
|
||||
public deactivateSelectedProjects(): void {
|
||||
const promises = this.selection.selected.map(project => {
|
||||
this.projectService.DeactivateProject(project.projectId);
|
||||
this.mgmtService.DeactivateProject(project.projectId);
|
||||
});
|
||||
|
||||
Promise.all(promises).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user