@alfresco/adf-core 8.4.0-17433250431 → 8.4.0-17433991491

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ import * as i1$1 from '@ngx-translate/core';
8
8
  import { TranslatePipe, provideTranslateService, TranslateLoader, TranslateModule } from '@ngx-translate/core';
9
9
  import * as i1$8 from '@angular/common/http';
10
10
  import { HttpClient, HttpHeaders, HttpResponse, provideHttpClient, HTTP_INTERCEPTORS, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
11
- import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, combineLatest, defer, EMPTY, race, forkJoin, merge } from 'rxjs';
11
+ import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, firstValueFrom, combineLatest, defer, EMPTY, race, forkJoin, merge } from 'rxjs';
12
12
  import { map, distinctUntilChanged, take, switchMap, delay, catchError, skipWhile, filter, first, timeout, shareReplay, mergeMap, tap, retry, takeUntil, debounceTime, share, pairwise, buffer } from 'rxjs/operators';
13
13
  import * as i1$4 from '@alfresco/adf-extensions';
14
14
  import { ExtensionService, mergeObjects, ExtensionsModule, PreviewExtensionComponent } from '@alfresco/adf-extensions';
@@ -7550,7 +7550,7 @@ class AuthConfigService {
7550
7550
  return this._authConfig;
7551
7551
  }
7552
7552
  loadConfig() {
7553
- return this.appConfigService.onLoad.pipe(take(1)).toPromise().then(this.loadAppConfig.bind(this));
7553
+ return firstValueFrom(this.appConfigService.onLoad.pipe(take(1))).then(this.loadAppConfig.bind(this));
7554
7554
  }
7555
7555
  loadAppConfig() {
7556
7556
  const oauth2 = this.appConfigService.oauth2;
@@ -9792,7 +9792,7 @@ class IdentityUserService {
9792
9792
  async getUsersByRolesWithCurrentUser(roleNames) {
9793
9793
  const filteredUsers = [];
9794
9794
  if (roleNames && roleNames.length > 0) {
9795
- const users = await this.getUsers().toPromise();
9795
+ const users = await firstValueFrom(this.getUsers());
9796
9796
  for (let i = 0; i < users.length; i++) {
9797
9797
  const hasAnyRole = await this.userHasAnyRole(users[i].id, roleNames);
9798
9798
  if (hasAnyRole) {
@@ -9812,7 +9812,7 @@ class IdentityUserService {
9812
9812
  const filteredUsers = [];
9813
9813
  if (roleNames && roleNames.length > 0) {
9814
9814
  const currentUser = this.getCurrentUserInfo();
9815
- let users = await this.getUsers().toPromise();
9815
+ let users = await firstValueFrom(this.getUsers());
9816
9816
  users = users.filter(({ username }) => username !== currentUser.username);
9817
9817
  for (let i = 0; i < users.length; i++) {
9818
9818
  const hasAnyRole = await this.userHasAnyRole(users[i].id, roleNames);
@@ -9824,7 +9824,7 @@ class IdentityUserService {
9824
9824
  return filteredUsers;
9825
9825
  }
9826
9826
  async userHasAnyRole(userId, roleNames) {
9827
- const userRoles = await this.getUserRoles(userId).toPromise();
9827
+ const userRoles = await firstValueFrom(this.getUserRoles(userId));
9828
9828
  const hasAnyRole = roleNames.some((roleName) => {
9829
9829
  const filteredRoles = userRoles.filter((userRole) => userRole.name.toLocaleLowerCase() === roleName.toLocaleLowerCase());
9830
9830
  return filteredRoles.length > 0;