@stoker-platform/web-app 0.3.2 → 0.3.4

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(web-app): add tenant to expected download path
8
+
9
+ ## 0.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - fix: add tenant to base path
14
+
3
15
  ## 0.3.2
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Files.tsx CHANGED
@@ -561,7 +561,7 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
561
561
  let timeoutId: NodeJS.Timeout | null = null
562
562
 
563
563
  try {
564
- const expectedPath = `${labels.collection}/${record?.id}`
564
+ const expectedPath = `${tenantId}/${labels.collection}/${record?.id}`
565
565
  if (!item.fullPath.startsWith(expectedPath)) {
566
566
  throw new Error("Access denied: Invalid file path")
567
567
  }
package/src/Form.tsx CHANGED
@@ -2269,7 +2269,7 @@ function RecordForm({
2269
2269
  const computeBasePath = useCallback(
2270
2270
  (targetId: string) => {
2271
2271
  const baseArray = (collectionPath || record?.Collection_Path || path) as string[]
2272
- return `${baseArray.join("/")}/${targetId}`
2272
+ return `${tenantId}/${baseArray.join("/")}/${targetId}`
2273
2273
  },
2274
2274
  [collectionPath, record, path],
2275
2275
  )