From 314f758d622ab7391a30e4e71254cee46eafc272 Mon Sep 17 00:00:00 2001 From: Charlie Date: Thu, 22 Dec 2022 15:58:33 -0600 Subject: [PATCH] Update server/homebrew.api.js Co-authored-by: Trevor Buckner --- server/homebrew.api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/homebrew.api.js b/server/homebrew.api.js index 9f006bb70..e0984d4fe 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -60,7 +60,7 @@ const getBrew = (accessType, stubOnly = false)=>{ const authorsExist = stub?.authors?.length > 0; const isAuthor = stub?.authors?.includes(req.account?.username); const isInvited = stub?.invitedAuthors?.includes(req.account?.username); - if(accessType === 'edit' && (authorsExist && (!isAuthor || !isInvited))) { + if(accessType === 'edit' && (authorsExist && !(isAuthor || isInvited))) { throw `The current logged in user does not have editor access to this brew. If you believe you should have access to this brew, ask the file owner to invite you as an author by opening the brew, viewing the Properties tab, and adding your username to the "invited authors" list. You can then try to access this document again.`;