SUPER-3431 · paradev CLI
The CLI can read pages shared with "Anyone with the link"
A page set to Anyone with the link opens on the web for
everyone. Until this fix, superset pages get and
superset pages pull said Page not found unless you
were a member of the page's organization. The CLI looked only in your
active organization and never asked for the public copy the web viewer
shows to outsiders.
This page is the test
This page is set to Anyone with the link, in an organization you are probably not a member of. Run these with its link:
PAGE=https://app.superset.sh/page/super-3431-the-cli-can-read-anyone-with-the-link-p-xszcbb
superset pages get "$PAGE"
superset pages pull "$PAGE" > page.html
superset pages pull "$PAGE" --version 1
With a CLI built from the fix, get prints this page's
public details and pull writes this HTML. The third command
asks for an old version, which is not public, so it is refused with a
reason. With a released
CLI, both say Page not found. If you are in this
page's organization, nothing changes for you: the CLI uses the normal
lookup, as before.
Who can read what
| Who runs it | Command | Before | After |
|---|---|---|---|
| Not in the page's org, page is Anyone with the link | pages get <link or slug> |
Page not found | Public details: title, URL, served version, view URL |
| Same | pages pull <link or slug> |
Page not found | The served version's HTML as published: the same bytes a member pulls |
| Same |
pages pull … --version N, N not the served one
|
Page not found | Refused, with a reason: Version N is not public, and a hint that names the served version |
| In the page's org, with any access (owner, org role, or a view, comment or edit share) | get, pull |
Works | Works, unchanged. Full details, every version |
| Member of the page's org, but the CLI's active org is another one | get, pull |
"This page belongs to X. Switch to that organization" | The same switch hint. Switching gives full access, so the CLI does not hand you the reduced public copy instead |
| Anyone, page is Just me or Org | get, pull |
Page not found | Page not found. Nothing private is exposed |
| Anyone | Any command, given a page link | Link not understood; treated as a slug |
The link is read as its slug, for every
pages command
|
| Anyone | pages pull, given a link with ?v=N |
Page not found |
Pulls version N, as the web viewer shows it.
--version still wins. From outside the org, N
must be the served version
|
What it looked like
Run against production as a user who is not in the page's
organization, on a page shared with "Anyone with the link". The
pull lines are from the first version of the fix, which
downloaded the served document; it now reads the stored file through
page.publicPull, which works once that API is deployed.
Released CLI
$ superset pages get <link>
Error: Page not found
$ superset pages pull <link>
Error: Page not found
With the fix
$ superset pages get <link>
{
"slug": "pr-9641-review-…",
"title": "PR #9641 review: …",
"version": 1,
"viewUrl": "https://….frame.supersetusercontent.com/versions/1/",
…
"access": "public"
}
$ superset pages pull <link> | grep -o '<title>[^<]*'
<title>PR #9641 review
$ superset pages pull <link> --version 2
Error: Version 2 is not public
Hint: From outside its organization, only the version
this page serves (1) can be read
$ superset pages get no-such-page
Error: Page not found
How the CLI decides
- It asks for the page in your active organization, the same way it always has. If that works, you get the full result and nothing else happens.
-
If none of your organizations can open the page (page not
found), and you gave a slug or link, it asks for the page's public
copy: the same checks the web viewer applies to signed-out readers.
getmarks that result with"access": "public", andpulldownloads the stored file, not the document the viewer serves. - If the page has a public copy, you get it. If not, you get the original error.
- If the page belongs to another organization you are a member of, you get "Switch to that organization", as before. Switching gives full access.
- A missing version of a page you can read does not trigger this. You still get Version N not found, not a different version.
What this does not allow
- Nothing that isn't already public. The fallback reads only what any signed-out browser sees at this link: the served version, its title and description. No workspace links, watch state, owner or edit rights.
- No older versions, version list, comments or page storage from outside the organization. Those still need membership.
- No lookup by page id. The public copy is found by slug, which is in every link.
-
One new public read,
page.publicPull, with the same checks as the public viewer. It returns a download address for the stored file of the served version, so an outsider'spullgets the HTML as published, without the viewer's injected scripts and styles. It ships in its own PR, before the CLI.