Skip to content

Commit 7bfe733

Browse files
committed
fix: use files permission enum
1 parent 3e69ab2 commit 7bfe733

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

tests/playwright/support/utils/sharing.ts

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@
44
*/
55

66
import type { APIRequestContext } from '@playwright/test'
7+
import { Permission } from '@nextcloud/files'
78

8-
/** Nextcloud share permission bits (see OCS Share API). */
9-
export const SharePermission = {
10-
READ: 1,
11-
UPDATE: 2,
12-
CREATE: 4,
13-
DELETE: 8,
14-
SHARE: 16,
15-
} as const
169

1710
/** All permissions a user share can grant. */
18-
export const ALL_PERMISSIONS = SharePermission.READ
19-
| SharePermission.UPDATE
20-
| SharePermission.CREATE
21-
| SharePermission.DELETE
22-
| SharePermission.SHARE
11+
export const ALL_PERMISSIONS = Permission.READ
12+
| Permission.UPDATE
13+
| Permission.CREATE
14+
| Permission.DELETE
15+
| Permission.SHARE
2316

2417
/**
2518
* Create a user-to-user share via the OCS Share API. Seeding shares through the

0 commit comments

Comments
 (0)