refactor: improve workspace ID handling by adding check for current workspace permissions
This commit is contained in:
parent
58db4ed901
commit
178064f42c
@ -103,6 +103,9 @@ const useUserStore = defineStore('user', {
|
||||
})
|
||||
.filter((id) => id !== null); // 过滤掉无效的ID
|
||||
if (workspaceManagePermissions && workspaceManagePermissions.length > 0) {
|
||||
if (workspaceManagePermissions.includes(localStorage.getItem('workspace_id') || 'default')) {
|
||||
return
|
||||
}
|
||||
this.setWorkspaceId(workspaceManagePermissions[0])
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user