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 K2204514ae630
diff --git a/apps/web/lib/folder/permissions.ts b/apps/web/lib/folder/permissions.ts
index 2cb657e59b..6e18e633ab 100644
--- a/apps/web/lib/folder/permissions.ts
+++ b/apps/web/lib/folder/permissions.ts
@@ -27,19 +27,19 @@ export const checkFolderPermission = async ({
userId,
});
- const folderUserRole = findUserFolderRole({
+ const userFolderRole = findUserFolderRole({
folder,
user: folder.user,
});
- if (!folderUserRole) {
+ if (!userFolderRole) {
throw new DubApiError({
code: "forbidden",
message: "You are not allowed to perform this action on this folder.",
});
}
- const permissions = getFolderPermissions(folderUserRole);
+ const permissions = getFolderPermissions(userFolderRole);
if (!permissions.includes(requiredPermission)) {
throw new DubApiError({