mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5366] initialize discovery and version compatibility service for oauth based session (#6864)
* [ADF-5366] initialize discovery and version compatibility service for oauth based session * better error message * * fix spaces * * revert the search service * * fix build * * check properties after type update * * check properties after type update * * check properties after type update * * fix infinite loop * * fix test without title * * wait for options * * wait for session * Update metadata-content-type.e2e.ts * Update metadata-content-type.e2e.ts * Update protractor.excludes.json * Update protractor.excludes.json
This commit is contained in:
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Injectable } from '@angular/core';
|
||||
import { from, merge, Observable, BehaviorSubject, throwError } from 'rxjs';
|
||||
import { from, merge, Observable, throwError, Subject } from 'rxjs';
|
||||
import { BpmProductVersionModel, EcmProductVersionModel } from '../models/product-version.model';
|
||||
import { AlfrescoApiService } from './alfresco-api.service';
|
||||
import { catchError, filter, map, switchMap } from 'rxjs/operators';
|
||||
import { catchError, filter, map, switchMap, take } from 'rxjs/operators';
|
||||
import { Activiti, SystemPropertiesRepresentation } from '@alfresco/js-api';
|
||||
import { AuthenticationService } from './authentication.service';
|
||||
|
||||
@@ -31,13 +31,13 @@ export class DiscoveryApiService {
|
||||
/**
|
||||
* Gets product information for Content Services.
|
||||
*/
|
||||
ecmProductInfo$ = new BehaviorSubject<EcmProductVersionModel>(null);
|
||||
ecmProductInfo$ = new Subject<EcmProductVersionModel>();
|
||||
|
||||
constructor(
|
||||
private apiService: AlfrescoApiService,
|
||||
private authenticationService: AuthenticationService) {
|
||||
|
||||
merge(this.apiService.alfrescoApiInitialized, this.authenticationService.onLogin)
|
||||
merge(this.authenticationService.onTokenExchange.pipe(take(1)), this.authenticationService.onLogin)
|
||||
.pipe(
|
||||
filter(() => this.apiService.getInstance()?.isEcmLoggedIn()),
|
||||
switchMap(() => this.getEcmProductInfo())
|
||||
|
Reference in New Issue
Block a user