Update server/homebrew.api.js

Co-authored-by: Trevor Buckner <calculuschild@gmail.com>
This commit is contained in:
CharlieandTrevor Buckner authored and GitHub committed 2022-12-22 15:58:33 -06:00
1 parent 2f5bc8db54
commit 314f758d62
1 file changed
+1 -1
+1 -1
View File
@@ -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.`;