mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-07 22:55:12 +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:
@@ -10,7 +10,7 @@ import {
|
||||
UserGrantSearchResponse,
|
||||
UserGrantView,
|
||||
} from 'src/app/proto/generated/management_pb';
|
||||
import { MgmtUserService } from 'src/app/services/mgmt-user.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
|
||||
export enum UserGrantContext {
|
||||
// AUTHUSER = 'authuser',
|
||||
@@ -27,7 +27,7 @@ export class UserGrantsDataSource extends DataSource<UserGrant.AsObject> {
|
||||
private loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
|
||||
public loading$: Observable<boolean> = this.loadingSubject.asObservable();
|
||||
|
||||
constructor(private userService: MgmtUserService) {
|
||||
constructor(private userService: ManagementService) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,7 @@ import {
|
||||
UserGrantSearchQuery,
|
||||
UserGrantView,
|
||||
} from 'src/app/proto/generated/management_pb';
|
||||
import { MgmtUserService } from 'src/app/services/mgmt-user.service';
|
||||
import { ProjectService } from 'src/app/services/project.service';
|
||||
import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
|
||||
import { UserGrantContext, UserGrantsDataSource } from './user-grants-datasource';
|
||||
@@ -51,8 +50,8 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
|
||||
public UserGrantContext: any = UserGrantContext;
|
||||
|
||||
constructor(
|
||||
private userService: MgmtUserService,
|
||||
private projectService: ProjectService,
|
||||
private userService: ManagementService,
|
||||
private mgmtService: ManagementService,
|
||||
private toast: ToastService,
|
||||
) { }
|
||||
|
||||
@@ -125,7 +124,7 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
public getGrantRoleOptions(grantId: string, projectId: string): void {
|
||||
this.projectService.GetGrantedProjectByID(projectId, grantId).then(resp => {
|
||||
this.mgmtService.GetGrantedProjectByID(projectId, grantId).then(resp => {
|
||||
this.loadedGrantId = projectId;
|
||||
this.grantRoleOptions = resp.toObject().roleKeysList;
|
||||
}).catch(error => {
|
||||
@@ -134,7 +133,7 @@ export class UserGrantsComponent implements OnInit, AfterViewInit {
|
||||
}
|
||||
|
||||
public getProjectRoleOptions(projectId: string): void {
|
||||
this.projectService.SearchProjectRoles(projectId, 100, 0).then(resp => {
|
||||
this.mgmtService.SearchProjectRoles(projectId, 100, 0).then(resp => {
|
||||
this.loadedProjectId = projectId;
|
||||
this.projectRoleOptions = resp.toObject().resultList;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user