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

endatix / endatix-hub / 26183617452

20 May 2026 07:00PM UTC coverage: 51.833% (+0.6%) from 51.239%
26183617452

push

github

web-flow
feat!: Add S3 Storage provider (#637)

Merged after approval

1373 of 2342 branches covered (58.63%)

Branch coverage included in aggregate %.

1173 of 1884 new or added lines in 122 files covered. (62.26%)

12 existing lines in 11 files now uncovered.

5599 of 11109 relevant lines covered (50.4%)

9.51 hits per line

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

0.0
/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

6
function isContentNamespace(blobName: string): boolean {
NEW
7
  return blobName.startsWith("f/") || blobName.startsWith("t/");
×
8
}
9

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

NEW
22
  if (container === contentContainer) {
×
NEW
23
    if (!isContentNamespace(blobName)) {
×
NEW
24
      return "Content object is not in form content namespace";
×
25
    }
NEW
26
    return null;
×
27
  }
28

NEW
29
  if (container !== userFilesContainer) {
×
NEW
30
    return "Unknown storage container";
×
31
  }
32

NEW
33
  return assertUserFileBlobPath(
×
34
    blobName,
35
    { formId: access.formId, submissionId: access.submissionId },
36
    { requireSubmission: true },
37
  );
38
}
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