mirror of
https://github.com/docmost/docmost.git
synced 2026-05-20 08:34:04 +08:00
WIP
This commit is contained in:
@@ -75,7 +75,6 @@ export class AuthenticationExtension implements Extension {
|
|||||||
await this.pagePermissionRepo.getUserPageAccessLevel(user.id, page.id);
|
await this.pagePermissionRepo.getUserPageAccessLevel(user.id, page.id);
|
||||||
|
|
||||||
if (hasRestriction) {
|
if (hasRestriction) {
|
||||||
// Page has restrictions - use page-level permissions
|
|
||||||
if (!canAccess) {
|
if (!canAccess) {
|
||||||
this.logger.warn(
|
this.logger.warn(
|
||||||
`User ${user.id} denied page-level access to page: ${pageId}`,
|
`User ${user.id} denied page-level access to page: ${pageId}`,
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ export class AttachmentController {
|
|||||||
throw new NotFoundException('Page not found');
|
throw new NotFoundException('Page not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks both space-level and page-level edit permissions
|
|
||||||
await this.pageAccessService.validateCanEdit(page, user);
|
await this.pageAccessService.validateCanEdit(page, user);
|
||||||
|
|
||||||
const spaceId = page.spaceId;
|
const spaceId = page.spaceId;
|
||||||
@@ -173,7 +172,6 @@ export class AttachmentController {
|
|||||||
throw new NotFoundException();
|
throw new NotFoundException();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checks both space-level and page-level view permissions
|
|
||||||
await this.pageAccessService.validateCanView(page, user);
|
await this.pageAccessService.validateCanView(page, user);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user