Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update permissions.ts

Kiran Kdc34b6b3750e
diff --git a/apps/web/lib/folder/permissions.ts b/apps/web/lib/folder/permissions.ts
index 8cda5bcbd2..2cca271295 100644
--- a/apps/web/lib/folder/permissions.ts
+++ b/apps/web/lib/folder/permissions.ts
@@ -81,32 +81,6 @@ export const findUserFolderRole = ({
return FOLDER_WORKSPACE_ACCESS_TO_FOLDER_USER_ROLE[folder.accessLevel];
};
-// A version of verifyFolderAccess that does not throw an error if the user does not have access
-export const hasFolderPermission = async ({
- workspaceId,
- userId,
- folderId,
- requiredPermission,
-}: {
- workspaceId: string;
- userId: string;
- folderId: string;
- requiredPermission: FolderPermission;
-}) => {
- try {
- await verifyFolderAccess({
- workspaceId,
- userId,
- folderId,
- requiredPermission,
- });
-
- return true;
- } catch (error) {
- return false;
- }
-};
-
export const checkFolderPermissions = async ({
workspaceId,
userId,