diff --git a/server/homebrew.api.js b/server/homebrew.api.js index ec8e438fa..563926f01 100644 --- a/server/homebrew.api.js +++ b/server/homebrew.api.js @@ -43,6 +43,9 @@ const getBrew = (accessType, fetchGoogle = true)=>{ } }); stub = stub?.toObject(); + if(stub?.authors && !stub?.authors.includes(req.account.username)) { + throw 'Current logged in user does not have access to this brew.'; + } // If there is a google id, try to find the google brew if(fetchGoogle && (googleId || stub?.googleId)) {