Skip to content

Commit

Permalink
fix(sharing): Don't ask for guest name on view-only share
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Danzberger <[email protected]>
  • Loading branch information
elzody committed Sep 19, 2024
1 parent d86f23f commit 7a2331a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/helpers/guestName.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ export function shouldAskForGuestName(mimetype, canWrite) {
const noCurrentUser = !getCurrentUser() || getCurrentUser()?.uid === ''
const isReadOnlyPDF = mimetype === 'application/pdf' && !canWrite

if (!canWrite) {
return false
}

return noLoggedInUser && noGuest && noCurrentUser && !isReadOnlyPDF
}

0 comments on commit 7a2331a

Please sign in to comment.