@lightdash/cli 0.2282.4 → 0.2283.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../src/handlers/dbt/apiClient.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,WAAW,EAIX,WAAW,EACX,KAAK,6BAA6B,EAErC,MAAM,mBAAmB,CAAC;AAC3B,OAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQ7C,KAAK,iBAAiB,GAAG;IACrB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B,CAAC;AACF,eAAO,MAAM,YAAY,GAAU,CAAC,SAAS,WAAW,CAAC,SAAS,CAAC,0BAIhE,iBAAiB,KAAG,OAAO,CAAC,CAAC,CA+C/B,CAAC;AAEF,eAAO,MAAM,cAAc,QACb,OAAO,CAAC,6BAA6B,CAKzC,CAAC;AAEX,eAAO,MAAM,8BAA8B,wBAClB,MAAM,GAAG,SAAS,eAC1B,WAAW,KACzB,OAAO,CAAC,IAAI,CA4Fd,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAwB1D,CAAC"}
1
+ {"version":3,"file":"apiClient.d.ts","sourceRoot":"","sources":["../../../src/handlers/dbt/apiClient.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,WAAW,EAIX,WAAW,EACX,KAAK,6BAA6B,EAErC,MAAM,mBAAmB,CAAC;AAC3B,OAAc,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQ7C,KAAK,iBAAiB,GAAG;IACrB,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;CAC9B,CAAC;AACF,eAAO,MAAM,YAAY,GAAU,CAAC,SAAS,WAAW,CAAC,SAAS,CAAC,0BAIhE,iBAAiB,KAAG,OAAO,CAAC,CAAC,CA+C/B,CAAC;AAEF,eAAO,MAAM,cAAc,QACb,OAAO,CAAC,6BAA6B,CAKzC,CAAC;AAEX,eAAO,MAAM,8BAA8B,wBAClB,MAAM,GAAG,SAAS,eAC1B,WAAW,KACzB,OAAO,CAAC,IAAI,CAkGd,CAAC;AAEF,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,IAAI,CAwB1D,CAAC"}
@@ -65,7 +65,7 @@ const checkProjectCreationPermission = async (upstreamProjectUuid, projectType)
65
65
  // Build CASL ability from user's ability rules (same as backend)
66
66
  const ability = new ability_1.Ability(user.abilityRules);
67
67
  if (!user.organizationUuid) {
68
- throw new common_1.ForbiddenError(`You don't have permission to create projects.`);
68
+ throw new common_1.ForbiddenError(`You don't have permission to create projects. Please ensure you're a member of an organization.`);
69
69
  }
70
70
  // Replicates logic from ProjectService.validateProjectCreationPermissions
71
71
  switch (projectType) {
@@ -76,7 +76,9 @@ const checkProjectCreationPermission = async (upstreamProjectUuid, projectType)
76
76
  }))) {
77
77
  return;
78
78
  }
79
- throw new common_1.ForbiddenError("You don't have permission to create projects");
79
+ throw new common_1.ForbiddenError(`You don't have permission to create projects in this organization.\n` +
80
+ `This typically requires the 'admin' or 'developer' role.\n` +
81
+ `Contact your organization admin to request access.`);
80
82
  case common_1.ProjectType.PREVIEW:
81
83
  if (upstreamProjectUuid) {
82
84
  if (
@@ -85,7 +87,9 @@ const checkProjectCreationPermission = async (upstreamProjectUuid, projectType)
85
87
  organizationUuid: user.organizationUuid,
86
88
  projectUuid: upstreamProjectUuid,
87
89
  }))) {
88
- throw new common_1.ForbiddenError("Unable to create preview project: you don't have permission to access upstream project");
90
+ throw new common_1.ForbiddenError(`Unable to create preview project: you don't have permission to access the upstream project.\n` +
91
+ `You need 'view' access to the project you're trying to preview from.\n` +
92
+ `Contact your admin to request access.`);
89
93
  }
90
94
  if (
91
95
  // checks if user has permission to create project from an upstream project on a project level
@@ -104,7 +108,9 @@ const checkProjectCreationPermission = async (upstreamProjectUuid, projectType)
104
108
  }))) {
105
109
  return;
106
110
  }
107
- throw new common_1.ForbiddenError("You don't have permission to create preview projects");
111
+ throw new common_1.ForbiddenError(`You don't have permission to create preview projects in this organization.\n` +
112
+ `This typically requires the 'developer' or 'admin' role.\n` +
113
+ `Contact your organization admin to request access.`);
108
114
  default:
109
115
  throw new Error(`Unknown project type: ${projectType}`);
110
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "0.2282.4",
3
+ "version": "0.2283.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,8 +38,8 @@
38
38
  "unique-names-generator": "^4.7.1",
39
39
  "uuid": "^11.0.3",
40
40
  "yaml": "^2.7.0",
41
- "@lightdash/warehouses": "0.2282.4",
42
- "@lightdash/common": "0.2282.4"
41
+ "@lightdash/common": "0.2283.0",
42
+ "@lightdash/warehouses": "0.2283.0"
43
43
  },
44
44
  "description": "Lightdash CLI tool",
45
45
  "devDependencies": {