@open-rlb/ng-app 3.1.24 → 3.1.26

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.
@@ -401,6 +401,8 @@ const AclActions = createActionGroup({
401
401
  'Load ACL Success': props(),
402
402
  'Load ACL Failure': props(),
403
403
  'Reset': emptyProps(),
404
+ 'Finalized Apps Success': emptyProps(),
405
+ 'Finalized Apps Failure': emptyProps()
404
406
  }
405
407
  });
406
408
 
@@ -523,6 +525,7 @@ class AppsService {
523
525
  const confAcl = this.confAcl;
524
526
  return apps.filter(app => {
525
527
  // Basic domain check
528
+ console.log('Filtering app:', app);
526
529
  const isDomainAllowed = !app.domains || app.domains.includes(this.currentDomain);
527
530
  if (!isDomainAllowed)
528
531
  return false;
@@ -3249,9 +3252,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
3249
3252
  }] });
3250
3253
 
3251
3254
  class AclEffects {
3252
- constructor(actions$, adminApi) {
3255
+ constructor(actions$, adminApi, rlbInitProvider, aclConfiguration, store) {
3253
3256
  this.actions$ = actions$;
3254
3257
  this.adminApi = adminApi;
3258
+ this.rlbInitProvider = rlbInitProvider;
3259
+ this.aclConfiguration = aclConfiguration;
3260
+ this.store = store;
3255
3261
  this.loadAclOnAuth$ = createEffect(() => {
3256
3262
  return this.actions$.pipe(
3257
3263
  // Listen for the action dispatched in AuthenticationService.checkAuthMultiple
@@ -3260,13 +3266,32 @@ class AclEffects {
3260
3266
  this.fetchAcl$ = createEffect(() => {
3261
3267
  return this.actions$.pipe(ofType(AclActions.loadACL), switchMap$1(() => this.adminApi.resourcesByUser$().pipe(map$1(resources => AclActions.loadACLSuccess({ resources })), catchError(error => of(AclActions.loadACLFailure({ error }))))));
3262
3268
  });
3269
+ this.finalizeAppsOnAclLoad$ = createEffect(() => {
3270
+ return this.actions$.pipe(ofType(AclActions.loadACLSuccess), switchMap$1(() => {
3271
+ if (!this.rlbInitProvider) {
3272
+ console.error("RlbInitProvider not found. Define RLB_INIT_PROVIDER");
3273
+ return of(AclActions.finalizedAppsFailure());
3274
+ }
3275
+ return from(this.rlbInitProvider.finalizeApps(this.store, this.aclConfiguration)).pipe(map$1(() => AclActions.finalizedAppsSuccess()), catchError(() => of(AclActions.finalizedAppsFailure())));
3276
+ }));
3277
+ });
3263
3278
  }
3264
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects, deps: [{ token: i1$8.Actions }, { token: AdminApiService }], target: i0.ɵɵFactoryTarget.Injectable }); }
3279
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects, deps: [{ token: i1$8.Actions }, { token: AdminApiService }, { token: RLB_INIT_PROVIDER, optional: true }, { token: RLB_CFG_ACL, optional: true }, { token: i1$1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
3265
3280
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects }); }
3266
3281
  }
3267
3282
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects, decorators: [{
3268
3283
  type: Injectable
3269
- }], ctorParameters: () => [{ type: i1$8.Actions }, { type: AdminApiService }] });
3284
+ }], ctorParameters: () => [{ type: i1$8.Actions }, { type: AdminApiService }, { type: undefined, decorators: [{
3285
+ type: Optional
3286
+ }, {
3287
+ type: Inject,
3288
+ args: [RLB_INIT_PROVIDER]
3289
+ }] }, { type: undefined, decorators: [{
3290
+ type: Optional
3291
+ }, {
3292
+ type: Inject,
3293
+ args: [RLB_CFG_ACL]
3294
+ }] }, { type: i1$1.Store }] });
3270
3295
 
3271
3296
  const aclFeature = createFeature({
3272
3297
  name: aclFeatureKey,