• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

endatix / endatix-hub / 26227430372

21 May 2026 12:58PM UTC coverage: 52.52% (+0.3%) from 52.227%
26227430372

Pull #644

github

PeterMarinov
Adding dedicate content-object-path with tests; fixing template preview on forms create sheet
Pull Request #644: fix: Adding dedicate content-object-path assertion

1384 of 2336 branches covered (59.25%)

Branch coverage included in aggregate %.

9 of 9 new or added lines in 3 files covered. (100.0%)

14 existing lines in 5 files now uncovered.

5692 of 11137 relevant lines covered (51.11%)

11.64 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/features/form-access/assert-path/assert-public-object-access.ts
1
import type { ClientStorageConfig } from "@/features/asset-storage/infrastructure/providers/shared/client-storage-config";
2
import type { ParsedStorageObjectUrl } from "@/features/asset-storage/utils";
3
import type { FormStorageAccess } from "../types";
4
import { assertUserFileBlobPath } from "./assert-user-file-blob-path";
5
import { isContentObjectPath } from "./content-object-path";
6

7
/** Returns an error message when the object key is not allowed for public-plane access, or null if allowed. */
8
export function assertPublicObjectAccess(
9
  parsed: ParsedStorageObjectUrl,
10
  access: FormStorageAccess,
11
  storageConfig: ClientStorageConfig,
12
): string | null {
13
  const userFilesContainer =
14
    storageConfig.containerNames.USER_FILES.toLowerCase();
3✔
15
  const contentContainer = storageConfig.containerNames.CONTENT.toLowerCase();
3✔
16
  const container = parsed.containerName.toLowerCase();
3✔
17
  const blobName = parsed.blobName;
3✔
18

19
  if (container === contentContainer) {
3✔
20
    if (!isContentObjectPath(blobName)) {
3✔
21
      return "Content object is not in form content namespace";
1✔
22
    }
23
    return null;
2✔
24
  }
25

UNCOV
26
  if (container !== userFilesContainer) {
×
UNCOV
27
    return "Unknown storage container";
×
28
  }
29

UNCOV
30
  return assertUserFileBlobPath(
×
31
    blobName,
32
    { formId: access.formId, submissionId: access.submissionId },
33
    { requireSubmission: true },
34
  );
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc