gamma-app-controller 3.0.4 → 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
@@ -18756,12 +18757,18 @@ class TemplateDatasetCallService {
18756
18757
  .map(f => f.defaultValue);
18757
18758
  let isMatch;
18758
18759
  const username = this.securityPrincipal.getPrincipalName();
18759
- if (username == "admin" || this.securityPrincipal.groupDetails?.includes('pronto-admin-group')) {
18760
+ const groups = this.securityPrincipal.groupDetails;
18761
+ const isProntoAdmin = Object.values(groups || {}).some((group) => group.groupName === 'pronto-admin-group');
18762
+ if (username === "admin" || isProntoAdmin) {
18760
18763
  isMatch = true;
18761
18764
  }
18762
18765
  else {
18763
18766
  const associatedTenants = this.securityPrincipal.getTargetTenantIds();
18764
- 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;
18765
18772
  }
18766
18773
  if (!isMatch) {
18767
18774
  this.toastr.error("Unauthorized Access");