Commit b3efbb9
Olivier Gintrand
fix: use absolute OAuth authorize URL and allow non-admin users to authorize
Two related fixes for OAuth UX in multi-user deployments:
1. tool_service.py: Build absolute authorize URL using
settings.app_domain + settings.app_root_path instead of a
relative path. AI agents (VS Code Copilot, etc.) receive
clickable URLs in ToolInvocationError messages. Applied in
both invoke_tool and stream_invoke_tool code paths.
2. gateways_partial.html: Decouple the OAuth Authorize button
from the can_modify permission check. OAuth authorization is
a per-user action (each user gets their own token), so any
authenticated user with gateway access should be able to
authorize. Fetch/Refresh Tools remains gated behind can_modify.
Fixes #3998
Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>1 parent 3c9a702 commit b3efbb9
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3159 | 3159 | | |
3160 | 3160 | | |
3161 | 3161 | | |
3162 | | - | |
| 3162 | + | |
| 3163 | + | |
3163 | 3164 | | |
3164 | 3165 | | |
3165 | 3166 | | |
| |||
4162 | 4163 | | |
4163 | 4164 | | |
4164 | 4165 | | |
4165 | | - | |
| 4166 | + | |
| 4167 | + | |
4166 | 4168 | | |
4167 | 4169 | | |
4168 | 4170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
0 commit comments