Commit 08d8e37
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 a2aa82a commit 08d8e37
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3344 | 3344 | | |
3345 | 3345 | | |
3346 | 3346 | | |
3347 | | - | |
| 3347 | + | |
| 3348 | + | |
3348 | 3349 | | |
3349 | 3350 | | |
3350 | 3351 | | |
| |||
4377 | 4378 | | |
4378 | 4379 | | |
4379 | 4380 | | |
4380 | | - | |
| 4381 | + | |
| 4382 | + | |
4381 | 4383 | | |
4382 | 4384 | | |
4383 | 4385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
0 commit comments