mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
test: cover share page e2e (#4126)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user