Skip to content

fix(navigation): honour --enable-write-tools for generate_deeplink - #1337

Open
MehmetSecgin wants to merge 1 commit into
grafana:mainfrom
MehmetSecgin:fix/generate-deeplink-write-override
Open

MehmetSecgin wants to merge 1 commit into
grafana:mainfrom
MehmetSecgin:fix/generate-deeplink-write-override

Conversation

@MehmetSecgin

@MehmetSecgin MehmetSecgin commented Oct 15, 2026 •

Copy link
Copy Markdown

What this changes

On a server run with --disable-write, --enable-write-tools=generate_deeplink now registers the writable generate_deeplink, so shorten=true returns a /goto/<uid> link instead of being silently ignored. Before, AddNavigationTools received the global write flag, so the per-tool override never reached it.

Related: #820

Short URLs are a POST /api/short-urls that needs no RBAC action, so they fit the scoped opt-in that --enable-write-tools exists for. No tool name, input or output shape changes. Without the override, --disable-write still registers the read-only variant.

How you tested it

Unit tests only, no live Grafana instance.

  • TestProcessTools_EnableWriteToolsRestoresWritableDeeplink: with --disable-write and the override, generate_deeplink is the writable variant (readOnlyHint: false) and other write tools such as update_dashboard stay unregistered. It fails on main.
  • TestProcessTools_DisableWriteRegistersReadOnlyDeeplink: with --disable-write alone, the read-only variant is registered.

Checklist

  • make lint and make test-unit pass locally
  • Commits are signed (required to merge, see CONTRIBUTING.md)
  • CLA signed (required to merge)
  • README tool table updated, with RBAC permissions and scopes, if this adds a tool (n/a, no new tool)
  • Any write operation respects --disable-write
  • Any datasource query execution respects --disable-query (n/a, no query execution)

@MehmetSecgin
MehmetSecgin requested a review from a team as a code owner October 15, 2026 13:18
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Signed commits report

All 1 commit between main and fix/generate-deeplink-write-override have verified signatures. ✅

@cla-assistant

cla-assistant Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@MehmetSecgin
MehmetSecgin force-pushed the fix/generate-deeplink-write-override branch from 8fbf0d6 to e5e01e8 Compare October 15, 2026 13:26

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant