mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-16 05:30:46 +08:00
Fix workspaceRegistry inject and restore WS UDS identity.
Stop Cordis throws on ctx.workspaceRegistry, inject the registry handle for provisioning, and bind login identity onto remote.mux WebSocket listeners so super_admin keeps all workspaces. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
42618379a5
commit
a5ba9d52cc
4 changed files with 124 additions and 5 deletions
|
|
@ -673,11 +673,13 @@ function installSettingsSection(ctx, entry, hooks) {
|
|||
}
|
||||
|
||||
|
||||
let _workspaceRegistry = null
|
||||
|
||||
async function ensureUserWorkspace(empNo) {
|
||||
if (!_userWorkspaces || !_pluginCtx) return null
|
||||
if (!_userWorkspaces) return null
|
||||
try {
|
||||
return await _userWorkspaces.ensureUserWorkspace(
|
||||
_pluginCtx,
|
||||
{ workspaceRegistryHandle: _workspaceRegistry },
|
||||
_currentConfig?.workspaceRoot,
|
||||
empNo,
|
||||
)
|
||||
|
|
@ -779,6 +781,11 @@ async function initServices(ctx, config) {
|
|||
patchServer(wctx.webServer)
|
||||
})
|
||||
|
||||
ctx.inject(['workspaceRegistry'], (wctx) => {
|
||||
_workspaceRegistry = wctx.workspaceRegistry
|
||||
ctx.logger?.info?.('[uds-auth] workspaceRegistry ready')
|
||||
})
|
||||
|
||||
installDshAcl(ctx, {
|
||||
sessionAcl: _sessionAcl,
|
||||
userWorkspaces: _userWorkspaces,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue