🐛 Change the display name of the Anonymous user (#108)
This commit is contained in:
@@ -500,7 +500,7 @@ export class DocumentsController {
|
|||||||
if (!document || !document.access || document.access === "none")
|
if (!document || !document.access || document.access === "none")
|
||||||
throw new CrudException("You don't have access to this document", 401);
|
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);
|
let user = await globalResolver.services.users.getByEmail(email);
|
||||||
if (!user) {
|
if (!user) {
|
||||||
user = (
|
user = (
|
||||||
|
|||||||
@@ -141,9 +141,6 @@ const AccessChecker = ({
|
|||||||
})();
|
})();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (!details?.item?.id && loading) {
|
|
||||||
return <></>;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((!details?.item?.id && !loading) || !accessGranted) {
|
if ((!details?.item?.id && !loading) || !accessGranted) {
|
||||||
return (
|
return (
|
||||||
@@ -170,7 +167,7 @@ const AccessChecker = ({
|
|||||||
theme="primary"
|
theme="primary"
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
await setPublicToken(token || '', password);
|
await setPublicToken(token || '', password);
|
||||||
refresh(folderId);
|
await refresh(folderId);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
|
|||||||
Reference in New Issue
Block a user