gamma-app-controller 3.0.5 → 3.0.6

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.
@@ -18749,6 +18749,7 @@ class TemplateDatasetCallService {
18749
18749
  }
18750
18750
  getDatasetForSqlTemplate(backendService, dataset, datasetId, filters) {
18751
18751
  return new Promise((resolve, reject) => {
18752
+ debugger;
18752
18753
  const operator = (filters && filters.length !== 0) ? Object.keys(filters.operationFilter).map(key => ({ [key]: filters.operationFilter[key] })) : [];
18753
18754
  let requestAp = dataset.config.api;
18754
18755
  const tenantIds = dataset.config.queryConfig.mapedFilters
@@ -18757,13 +18758,17 @@ class TemplateDatasetCallService {
18757
18758
  let isMatch;
18758
18759
  const username = this.securityPrincipal.getPrincipalName();
18759
18760
  const groups = this.securityPrincipal.groupDetails;
18760
- if (username === "admin" ||
18761
- (Array.isArray(groups) && groups.includes('pronto-admin-group'))) {
18761
+ const isProntoAdmin = Object.values(groups || {}).some((group) => group.groupName === 'pronto-admin-group');
18762
+ if (username === "admin" || isProntoAdmin) {
18762
18763
  isMatch = true;
18763
18764
  }
18764
18765
  else {
18765
18766
  const associatedTenants = this.securityPrincipal.getTargetTenantIds();
18766
- isMatch = (tenantIds) ? (associatedTenants) ? tenantIds.some(t => associatedTenants.includes(t)) : false : true;
18767
+ isMatch = (tenantIds)
18768
+ ? (associatedTenants)
18769
+ ? tenantIds.some(t => associatedTenants.includes(t))
18770
+ : false
18771
+ : true;
18767
18772
  }
18768
18773
  if (!isMatch) {
18769
18774
  this.toastr.error("Unauthorized Access");