diff --git a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts index 4570f726..d3e13fdf 100644 --- a/tdrive/backend/node/src/services/documents/web/controllers/documents.ts +++ b/tdrive/backend/node/src/services/documents/web/controllers/documents.ts @@ -500,7 +500,7 @@ export class DocumentsController { if (!document || !document.access || document.access === "none") throw new CrudException("You don't have access to this document", 401); - const email = document.item.company_id + "-anonymous@tdrive.com"; + const email = `anonymous@${document.item.company_id}.tdrive.com`; let user = await globalResolver.services.users.getByEmail(email); if (!user) { user = ( diff --git a/tdrive/frontend/src/app/views/client/body/drive/shared.tsx b/tdrive/frontend/src/app/views/client/body/drive/shared.tsx index 9732ada8..e03fbeca 100755 --- a/tdrive/frontend/src/app/views/client/body/drive/shared.tsx +++ b/tdrive/frontend/src/app/views/client/body/drive/shared.tsx @@ -141,9 +141,6 @@ const AccessChecker = ({ })(); }, []); - if (!details?.item?.id && loading) { - return <>; - } if ((!details?.item?.id && !loading) || !accessGranted) { return ( @@ -170,7 +167,7 @@ const AccessChecker = ({ theme="primary" onClick={async () => { await setPublicToken(token || '', password); - refresh(folderId); + await refresh(folderId); }} > Submit