fix: hide trash from can view permission (#1445)

This commit is contained in:
Philip Okugbe
2025-08-04 08:35:28 +01:00
committed by GitHub
parent b0c557272d
commit 95b7be61df
5 changed files with 33 additions and 9 deletions

View File

@ -1,7 +1,7 @@
import { IsOptional, IsString } from 'class-validator';
import { IsNotEmpty, IsString } from 'class-validator';
export class DeletedPageDto {
@IsOptional()
@IsNotEmpty()
@IsString()
spaceId: string;
}

View File

@ -194,7 +194,7 @@ export class PageController {
deletedPageDto.spaceId,
);
if (ability.cannot(SpaceCaslAction.Read, SpaceCaslSubject.Page)) {
if (ability.cannot(SpaceCaslAction.Manage, SpaceCaslSubject.Page)) {
throw new ForbiddenException();
}