Browse Source

Merge pull request #20843 from abpframework/auto-merge/rel-8-3/3009

Merge branch dev with rel-8.3
pull/20846/head
maliming 2 years ago
committed by GitHub
parent
commit
5daf174189
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      npm/ng-packs/packages/core/src/lib/models/environment.ts
  2. 8
      npm/ng-packs/packages/core/src/lib/services/environment.service.ts

7
npm/ng-packs/packages/core/src/lib/models/environment.ts

@ -7,7 +7,7 @@ export interface Environment {
hmr?: boolean;
test?: boolean;
localization?: { defaultResourceName?: string };
oAuthConfig?: AuthConfig;
oAuthConfig?: AuthConfig & { impersonation?: Impersonation };
production: boolean;
remoteEnv?: RemoteEnv;
[key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
@ -38,3 +38,8 @@ export interface RemoteEnv {
method?: string;
headers?: ABP.Dictionary<string>;
}
export interface Impersonation {
tenantImpersonation?: boolean;
userImpersonation?: boolean;
}

8
npm/ng-packs/packages/core/src/lib/services/environment.service.ts

@ -51,4 +51,12 @@ export class EnvironmentService {
getIssuer$() {
return this.store.sliceState(state => state?.oAuthConfig?.issuer).pipe(map(mapToIssuer));
}
getImpersonation() {
return this.store.state?.oAuthConfig?.impersonation || {};
}
getImpersonation$() {
return this.store.sliceState(state => state?.oAuthConfig?.impersonation || {});
}
}

Loading…
Cancel
Save