mirror of
https://github.com/docmost/docmost.git
synced 2026-05-19 07:54:05 +08:00
soft deleted page checks
This commit is contained in:
@@ -54,7 +54,7 @@ export class AuthenticationExtension implements Extension {
|
||||
|
||||
const page = await this.pageRepo.findById(pageId);
|
||||
if (!page) {
|
||||
this.logger.warn(`Page not found: ${pageId}`);
|
||||
this.logger.debug(`Page not found: ${pageId}`);
|
||||
throw new NotFoundException('Page not found');
|
||||
}
|
||||
|
||||
@@ -96,6 +96,10 @@ export class AuthenticationExtension implements Extension {
|
||||
}
|
||||
}
|
||||
|
||||
if (page.deletedAt) {
|
||||
data.connectionConfig.readOnly = true;
|
||||
}
|
||||
|
||||
this.logger.debug(`Authenticated user ${user.id} on page ${pageId}`);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user