Skip to content

Commit

Permalink
fix: public link tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MontaGhanmy committed Sep 15, 2023
1 parent 3363e60 commit 6e68088
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down

0 comments on commit 6e68088

Please sign in to comment.