mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 16:23:06 +10:00
todo
This commit is contained in:
@ -23,7 +23,7 @@ async function postHandler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
|
|
||||||
const document: PrismaDocument = await getDocument(+documentId, req, res);
|
const document: PrismaDocument = await getDocument(+documentId, req, res);
|
||||||
|
|
||||||
// todo encapsulate entity ownerships
|
// todo encapsulate entity ownerships checks
|
||||||
if (document.userId !== user.id) {
|
if (document.userId !== user.id) {
|
||||||
return res.status(401).send("User does not have access to this document.");
|
return res.status(401).send("User does not have access to this document.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user