@open-rlb/ng-app 3.1.24 → 3.1.25

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
 
@@ -3249,9 +3251,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
3249
3251
  }] });
3250
3252
 
3251
3253
  class AclEffects {
3252
- constructor(actions$, adminApi) {
3254
+ constructor(actions$, adminApi, rlbInitProvider, aclConfiguration, store) {
3253
3255
  this.actions$ = actions$;
3254
3256
  this.adminApi = adminApi;
3257
+ this.rlbInitProvider = rlbInitProvider;
3258
+ this.aclConfiguration = aclConfiguration;
3259
+ this.store = store;
3255
3260
  this.loadAclOnAuth$ = createEffect(() => {
3256
3261
  return this.actions$.pipe(
3257
3262
  // Listen for the action dispatched in AuthenticationService.checkAuthMultiple
@@ -3260,13 +3265,32 @@ class AclEffects {
3260
3265
  this.fetchAcl$ = createEffect(() => {
3261
3266
  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
3267
  });
3268
+ this.finalizeAppsOnAclLoad$ = createEffect(() => {
3269
+ return this.actions$.pipe(ofType(AclActions.loadACLSuccess), switchMap$1(() => {
3270
+ if (!this.rlbInitProvider) {
3271
+ console.error("RlbInitProvider not found. Define RLB_INIT_PROVIDER");
3272
+ return of(AclActions.finalizedAppsFailure());
3273
+ }
3274
+ return from(this.rlbInitProvider.finalizeApps(this.store, this.aclConfiguration)).pipe(map$1(() => AclActions.finalizedAppsSuccess()), catchError(() => of(AclActions.finalizedAppsFailure())));
3275
+ }));
3276
+ });
3263
3277
  }
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 }); }
3278
+ 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
3279
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects }); }
3266
3280
  }
3267
3281
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects, decorators: [{
3268
3282
  type: Injectable
3269
- }], ctorParameters: () => [{ type: i1$8.Actions }, { type: AdminApiService }] });
3283
+ }], ctorParameters: () => [{ type: i1$8.Actions }, { type: AdminApiService }, { type: undefined, decorators: [{
3284
+ type: Optional
3285
+ }, {
3286
+ type: Inject,
3287
+ args: [RLB_INIT_PROVIDER]
3288
+ }] }, { type: undefined, decorators: [{
3289
+ type: Optional
3290
+ }, {
3291
+ type: Inject,
3292
+ args: [RLB_CFG_ACL]
3293
+ }] }, { type: i1$1.Store }] });
3270
3294
 
3271
3295
  const aclFeature = createFeature({
3272
3296
  name: aclFeatureKey,