Policies refactor, guest roles (#6732)
This commit is contained in:
@@ -23,7 +23,7 @@ router.post(
|
||||
const document = await Document.findByPk(documentId, {
|
||||
userId: user.id,
|
||||
});
|
||||
authorize(user, "read", document);
|
||||
authorize(user, "listViews", document);
|
||||
|
||||
if (!document.insightsEnabled) {
|
||||
throw ValidationError("Insights are not enabled for this document");
|
||||
|
||||
Reference in New Issue
Block a user