mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(core): avoid shared page to fetch workspace info (#13104)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved permission handling to correctly identify user roles when the workspace is in shared mode or has a local flavour, ensuring accurate permissions are assigned in these scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -37,7 +37,10 @@ export class WorkspacePermission extends Entity {
|
||||
revalidate = effect(
|
||||
exhaustMapWithTrailing(() => {
|
||||
return fromPromise(async signal => {
|
||||
if (this.workspaceService.workspace.flavour !== 'local') {
|
||||
if (
|
||||
this.workspaceService.workspace.flavour !== 'local' &&
|
||||
!this.workspaceService.workspace.openOptions.isSharedMode
|
||||
) {
|
||||
const info = await this.store.fetchWorkspaceInfo(
|
||||
this.workspaceService.workspace.id,
|
||||
signal
|
||||
|
||||
Reference in New Issue
Block a user