Repository navigation
fix(navigation): honour --enable-write-tools for generate_deeplink - #1337
Open
MehmetSecgin wants to merge 1 commit into
Open
MehmetSecgin wants to merge 1 commit into
MehmetSecgin wants to merge 1 commit into
Conversation
Signed commits reportAll 1 commit between |
MehmetSecgin
force-pushed
the
fix/generate-deeplink-write-override
branch
from
October 15, 2026 13:26
8fbf0d6 to
e5e01e8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
On a server run with
--disable-write,--enable-write-tools=generate_deeplinknow registers the writablegenerate_deeplink, soshorten=truereturns a/goto/<uid>link instead of being silently ignored. Before,AddNavigationToolsreceived the global write flag, so the per-tool override never reached it.Related: #820
Short URLs are a
POST /api/short-urlsthat needs no RBAC action, so they fit the scoped opt-in that--enable-write-toolsexists for. No tool name, input or output shape changes. Without the override,--disable-writestill registers the read-only variant.How you tested it
Unit tests only, no live Grafana instance.
TestProcessTools_EnableWriteToolsRestoresWritableDeeplink: with--disable-writeand the override,generate_deeplinkis the writable variant (readOnlyHint: false) and other write tools such asupdate_dashboardstay unregistered. It fails onmain.TestProcessTools_DisableWriteRegistersReadOnlyDeeplink: with--disable-writealone, the read-only variant is registered.Checklist
make lintandmake test-unitpass locally--disable-write--disable-query(n/a, no query execution)