mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-16 12:27:53 +08:00
fix(ui): read the correct localStorage key for USER-scope always-approve
This commit is contained in:
parent
e2747df2c5
commit
130112c5bf
@ -2103,7 +2103,10 @@ async function handleApproveAlways(
|
|||||||
} else if (payload.scope === 'AGENT') {
|
} else if (payload.scope === 'AGENT') {
|
||||||
scopeId = String(currentAgent.value?.id ?? '')
|
scopeId = String(currentAgent.value?.id ?? '')
|
||||||
} else if (payload.scope === 'USER') {
|
} else if (payload.scope === 'USER') {
|
||||||
const me = localStorage.getItem('mc-user-id')
|
// Login persists the id under 'userId' (see Login.vue); the old 'mc-user-id'
|
||||||
|
// key was never written, so USER-scope always-approve silently failed to
|
||||||
|
// resolve a scopeId and fell back to a one-shot /approve without a grant.
|
||||||
|
const me = localStorage.getItem('userId')
|
||||||
if (me) scopeId = me
|
if (me) scopeId = me
|
||||||
}
|
}
|
||||||
if (!scopeId) {
|
if (!scopeId) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user