test: cover share page e2e (#4126)

This commit is contained in:
Alex Yang
2023-09-02 00:57:04 -05:00
committed by GitHub
parent 8825678ca9
commit 4f97ea8a5d
27 changed files with 186 additions and 99 deletions

View File

@@ -48,7 +48,11 @@ export class PermissionService {
return true;
} else {
// check if this is a public subpage
return subpages.map(page => `space:${page}`).includes(id);
// why use `endsWith`?
// because there might have `${wsId}:space:${subpageId}`,
// but subpages only have `${subpageId}`
return subpages.some(subpage => id.endsWith(subpage));
}
}
}