@open-rlb/ng-app 3.1.18 → 3.1.20

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.
@@ -1629,20 +1629,22 @@ class CompanyInterceptor {
1629
1629
  intercept(req, next) {
1630
1630
  const authConfig = this.config.auth;
1631
1631
  const isAllowed = authConfig?.allowedUrls?.some(url => req.url.includes(url));
1632
+ console.log('CompanyInterceptor: isAllowed', isAllowed, 'enableCompanyInterceptor', authConfig?.enableCompanyInterceptor);
1632
1633
  if (!isAllowed || !authConfig?.enableCompanyInterceptor) {
1633
1634
  return next.handle(req);
1634
1635
  }
1635
1636
  const currentApp = this.store.selectSignal(state => state[appContextFeatureKey].currentApp)();
1636
1637
  const data = currentApp?.data;
1637
1638
  const mapping = this.config.acl?.interceptorMapping || {};
1638
- const map = Object.keys(mapping).forEach((key) => {
1639
+ const params = req.params;
1640
+ Object.keys(mapping).forEach((key) => {
1639
1641
  const storeKey = mapping[key];
1640
1642
  const value = data?.[storeKey];
1641
1643
  if (!!value) {
1642
- req.params.set(key, value);
1644
+ params.set(key, value);
1643
1645
  }
1644
1646
  });
1645
- const clonedReq = req.clone({ params: req.params });
1647
+ const clonedReq = req.clone({ params });
1646
1648
  return next.handle(clonedReq);
1647
1649
  }
1648
1650
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: CompanyInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }