@open-rlb/ng-app 3.1.23 → 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
|
|
|
@@ -1674,6 +1676,7 @@ class CompanyInterceptor {
|
|
|
1674
1676
|
}
|
|
1675
1677
|
const currentApp = this.store.selectSignal(state => state[appContextFeatureKey].currentApp)();
|
|
1676
1678
|
const data = currentApp?.data;
|
|
1679
|
+
console.log('CompanyInterceptor - currentApp data:', data);
|
|
1677
1680
|
const mapping = this.config.acl?.interceptorMapping || {};
|
|
1678
1681
|
let params = req.params;
|
|
1679
1682
|
for (const key of Object.keys(mapping)) {
|
|
@@ -3248,9 +3251,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
3248
3251
|
}] });
|
|
3249
3252
|
|
|
3250
3253
|
class AclEffects {
|
|
3251
|
-
constructor(actions$, adminApi) {
|
|
3254
|
+
constructor(actions$, adminApi, rlbInitProvider, aclConfiguration, store) {
|
|
3252
3255
|
this.actions$ = actions$;
|
|
3253
3256
|
this.adminApi = adminApi;
|
|
3257
|
+
this.rlbInitProvider = rlbInitProvider;
|
|
3258
|
+
this.aclConfiguration = aclConfiguration;
|
|
3259
|
+
this.store = store;
|
|
3254
3260
|
this.loadAclOnAuth$ = createEffect(() => {
|
|
3255
3261
|
return this.actions$.pipe(
|
|
3256
3262
|
// Listen for the action dispatched in AuthenticationService.checkAuthMultiple
|
|
@@ -3259,13 +3265,32 @@ class AclEffects {
|
|
|
3259
3265
|
this.fetchAcl$ = createEffect(() => {
|
|
3260
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 }))))));
|
|
3261
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
|
+
});
|
|
3262
3277
|
}
|
|
3263
|
-
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 }); }
|
|
3264
3279
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects }); }
|
|
3265
3280
|
}
|
|
3266
3281
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AclEffects, decorators: [{
|
|
3267
3282
|
type: Injectable
|
|
3268
|
-
}], 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 }] });
|
|
3269
3294
|
|
|
3270
3295
|
const aclFeature = createFeature({
|
|
3271
3296
|
name: aclFeatureKey,
|