papermark icon indicating copy to clipboard operation
papermark copied to clipboard

feat: preview link as

Open yashsharma999 opened this issue 1 year ago • 3 comments

Fixes #696

Description

Quickly view the document/dataroom without going through access form, nda, verification etc.

Screenshots

Screenshot 2024-10-13 at 12 08 58 AM

yashsharma999 avatar Oct 12 '24 18:10 yashsharma999

@yashsharma999 is attempting to deploy a commit to the mftsio Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Oct 12 '24 18:10 vercel[bot]

alright, but essentially we need to somehow bypass isProtected prop if i'm not wrong ?

isProtected={
            viewAs === "QUICK_PREVIEW"
              ? false
              : !!(emailProtected || linkPassword || enableAgreement)
          }

yashsharma999 avatar Oct 14 '24 19:10 yashsharma999

but essentially we need to somehow bypass isProtected prop if i'm not wrong ?

@yashsharma999 yes that's correct. but right now with your current implementation, you could add ?viewAs=QUICK_VIEW to any normal link and it would bypass the isProtected.

Also as I'm writing it, we double check server-side actually if the link is protected again, so you'd need to pass something to the api function to get around the protection

mfts avatar Oct 19 '24 09:10 mfts

@yashsharma999 I'm closing this PR for now as I didn't hear back from you and it's not a big dealbreaker at the moment.

I'm still reviewing your other PRs.

I'm also rewarding you for your effort nonetheless! /award 150

mfts avatar Oct 27 '24 10:10 mfts

Awarding yashsharma999: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/yashsharma999

oss-gg[bot] avatar Oct 27 '24 10:10 oss-gg[bot]