We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e69ab2 commit aad5729Copy full SHA for aad5729
1 file changed
tests/playwright/support/utils/sharing.ts
@@ -5,14 +5,16 @@
5
6
import type { APIRequestContext } from '@playwright/test'
7
8
-/** Nextcloud share permission bits (see OCS Share API). */
+// we cannot import the enum directly from the files app.
9
+// It references the window object and causes errors when imported in a node context,
10
+// so we re-declare the relevant values here. The type assertion ensures we stay in sync.
11
export const SharePermission = {
12
READ: 1,
13
UPDATE: 2,
14
CREATE: 4,
15
DELETE: 8,
16
SHARE: 16,
-} as const
17
+} as const satisfies Partial<typeof import('@nextcloud/files').Permission>
18
19
/** All permissions a user share can grant. */
20
export const ALL_PERMISSIONS = SharePermission.READ
0 commit comments