Commit 6c53f77
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 2b6a68a commit 6c53f77
2 files changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3384 | 3384 | | |
3385 | 3385 | | |
3386 | 3386 | | |
3387 | | - | |
| 3387 | + | |
| 3388 | + | |
3388 | 3389 | | |
3389 | 3390 | | |
3390 | 3391 | | |
| |||
4466 | 4467 | | |
4467 | 4468 | | |
4468 | 4469 | | |
4469 | | - | |
| 4470 | + | |
| 4471 | + | |
4470 | 4472 | | |
4471 | 4473 | | |
4472 | 4474 | | |
| |||
| 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