mobicloud-core 1.0.210 → 1.0.211

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.
@@ -1429,19 +1429,19 @@
1429
1429
  if (_this.configService.log_httptrafic > 0)
1430
1430
  console.log({ log: "token renewed (adding new token)", tokenValidUntil: (_a = _this.coreService) === null || _a === void 0 ? void 0 : _a.tokenValidUntil, tokenExpiresAt: (_b = _this.coreService) === null || _b === void 0 ? void 0 : _b.tokenExpiresAt, is: (_c = _this.coreService) === null || _c === void 0 ? void 0 : _c.isTokenExpired, auth_header: (_d = _this.coreService) === null || _d === void 0 ? void 0 : _d.authorizationHeader, user: (_e = _this.coreService) === null || _e === void 0 ? void 0 : _e.user });
1431
1431
  req = req.clone({ headers: req.headers.set("Authorization", (_g = (_f = _this.coreService) === null || _f === void 0 ? void 0 : _f.authorizationHeader) !== null && _g !== void 0 ? _g : '') });
1432
- if (_this.coreService && _this.coreService.isMasterUserAuthenticated() && _this.coreService.require_Organization && !req.headers.has("OrganizationId")) {
1432
+ if (_this.coreService && _this.coreService.require_Organization && !req.headers.has("OrganizationId")) {
1433
1433
  var strMasterOrganizationId = _this.coreService.getMasterOrganization();
1434
1434
  if (strMasterOrganizationId && strMasterOrganizationId.length > 0) {
1435
1435
  req = req.clone({ headers: req.headers.set("OrganizationId", strMasterOrganizationId) });
1436
1436
  }
1437
1437
  }
1438
- if (_this.coreService && _this.coreService.isMasterEmployeeAuthenticated() && _this.coreService.require_Customer && !req.headers.has("CustomerId")) {
1438
+ if (_this.coreService && _this.coreService.require_Customer && !req.headers.has("CustomerId")) {
1439
1439
  var strMasterCustomerId = _this.coreService.getMasterCustomer();
1440
1440
  if (strMasterCustomerId && strMasterCustomerId.length > 0) {
1441
1441
  req = req.clone({ headers: req.headers.set("CustomerId", strMasterCustomerId) });
1442
1442
  }
1443
1443
  }
1444
- if (_this.coreService && _this.coreService.isMasterEmployeeAuthenticated() && _this.coreService.require_Vendor && !req.headers.has("VendorId")) {
1444
+ if (_this.coreService && _this.coreService.require_Vendor && !req.headers.has("VendorId")) {
1445
1445
  var strMasterVendorId = _this.coreService.getMasterVendor();
1446
1446
  if (strMasterVendorId && strMasterVendorId.length > 0) {
1447
1447
  req = req.clone({ headers: req.headers.set("VendorId", strMasterVendorId) });
@@ -1456,19 +1456,19 @@
1456
1456
  if (!req.headers.has("Authorization")) {
1457
1457
  req = req.clone({ headers: req.headers.set("Authorization", (_b = this.coreService.authorizationHeader) !== null && _b !== void 0 ? _b : '') });
1458
1458
  }
1459
- if (this.coreService.isMasterUserAuthenticated() && !req.headers.has("OrganizationId")) {
1459
+ if (this.coreService && this.coreService.require_Organization && !req.headers.has("OrganizationId")) {
1460
1460
  var strMasterOrganizationId = this.coreService.getMasterOrganization();
1461
1461
  if (strMasterOrganizationId && strMasterOrganizationId.length > 0) {
1462
1462
  req = req.clone({ headers: req.headers.set("OrganizationId", strMasterOrganizationId) });
1463
1463
  }
1464
1464
  }
1465
- if (this.coreService && this.coreService.isMasterEmployeeAuthenticated() && this.coreService.require_Customer && !req.headers.has("CustomerId")) {
1465
+ if (this.coreService && this.coreService.require_Customer && !req.headers.has("CustomerId")) {
1466
1466
  var strMasterCustomerId = this.coreService.getMasterCustomer();
1467
1467
  if (strMasterCustomerId && strMasterCustomerId.length > 0) {
1468
1468
  req = req.clone({ headers: req.headers.set("CustomerId", strMasterCustomerId) });
1469
1469
  }
1470
1470
  }
1471
- if (this.coreService && this.coreService.isMasterEmployeeAuthenticated() && this.coreService.require_Vendor && !req.headers.has("VendorId")) {
1471
+ if (this.coreService && this.coreService.require_Vendor && !req.headers.has("VendorId")) {
1472
1472
  var strMasterVendorId = this.coreService.getMasterVendor();
1473
1473
  if (strMasterVendorId && strMasterVendorId.length > 0) {
1474
1474
  req = req.clone({ headers: req.headers.set("VendorId", strMasterVendorId) });