From 6e6808876bcdf191c3743b8ec42ba7ac0de78087 Mon Sep 17 00:00:00 2001 From: montaghanmy Date: Fri, 15 Sep 2023 13:32:56 +0100 Subject: [PATCH] fix: public link tests --- .../src/services/documents/services/access-check.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tdrive/backend/node/src/services/documents/services/access-check.ts b/tdrive/backend/node/src/services/documents/services/access-check.ts index b5f2af3ea..8143f5ec5 100644 --- a/tdrive/backend/node/src/services/documents/services/access-check.ts +++ b/tdrive/backend/node/src/services/documents/services/access-check.ts @@ -246,7 +246,7 @@ export const getAccessLevel = async ( const prevalidatedPublicTokenDocumentId = context?.user?.public_token_document_id; try { - /* if (!item) { + if (!item) { item = await repository.findOne({ id, company_id: context.company.id, @@ -256,14 +256,6 @@ export const getAccessLevel = async ( if (!item) { throw Error("Drive item doesn't exist"); } - - if (await isCompanyApplication(context)) { - if (!id.startsWith("user_") && isMember && item.creator != context.user.id) { - return "read"; - } - return "manage"; - } - /* * Specific user or channel rule is applied first. Then less restrictive level will be chosen * between the parent folder and company accesses.