Unblock composer for normal QR users after login.

Stop leaving pointer-events locks on the inert workspace card, and auto-bind the provisioned personal workspace from /api/me.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-08 14:45:52 +08:00
parent 6b24fd15da
commit 1b397c6733
3 changed files with 76 additions and 6 deletions

View file

@ -46,12 +46,15 @@ export function createApiHandlers(config, sessionStore, rolesStore) {
}
async function getCurrentUser(ctx) {
const ws = ctx.provisionedWorkspace || null
await sendRes(ctx.res, 200, {
data: ctx.userContext ? {
...ctx.userContext,
empNo: ctx.empNo,
role: ctx.role,
permissions: ctx.permissions,
workspaceId: ws?.workspaceId || null,
workspacePath: ws?.path || null,
} : null,
authenticated: !!ctx.userContext,
})