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:
EYHN
2025-07-09 11:56:15 +08:00
committed by GitHub
parent 3cc33bd40f
commit ce7fffda08

View File

@@ -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