feat: Sharing improvements (#1388)
* add migrations * first pass at API * feat: Updated share dialog UI * tests * test * styling tweaks * feat: Show share state on document * fix: Allow publishing share links for draft docs * test: shares.info
This commit is contained in:
@ -391,7 +391,12 @@ async function loadDocument({ id, shareId, user }) {
|
||||
if (!share || share.document.archivedAt) {
|
||||
throw new InvalidRequestError("Document could not be found for shareId");
|
||||
}
|
||||
|
||||
document = share.document;
|
||||
|
||||
if (!share.published) {
|
||||
authorize(user, "read", document);
|
||||
}
|
||||
} else {
|
||||
document = await Document.findByPk(
|
||||
id,
|
||||
|
Reference in New Issue
Block a user