yangzhang75 opened a new pull request, #7856:
URL: https://github.com/apache/texera/pull/7856
Part of #7828. Stacked on #7853 — until the earlier ones merge this PR shows
their commits too; the review here is the last commit, `feat(workflow): serve
the pinned copy to public viewers`.
#7853 gave a workflow two copies: the author's working copy, and the frozen
one on public show. Nothing read the frozen one. This routes every read that
serves a viewer without granted access through it.
## The seam
`WorkflowAccessResource.hasGrantedAccess(wid, uid)` — granted access, as
opposed to being able to read a workflow only because it is public. Owner,
shared user and project member keep tracking the author's latest, because
**sharing is not publishing**. Everyone else is here because the workflow is
public, and gets the public copy.
`WorkflowPublishService.publicCopyOf` returns name, description and content
as a group, so no surface can pick up the published graph under a title the
author has not published.
## Name and description freeze with the graph
They are as public as the graph is. If only the graph froze, a report about
a title could be answered by editing the title, while the pinned copy still
advertised it — the freeze would hold the one part nobody complained about.
## Routed through it
| Path | A viewer without granted access now gets |
|---|---|
| opening a workflow | the pinned content |
| the hub's read (`/publicised/{wid}`) | the pinned name, description and
content |
| Clone | a copy of what the hub showed them — for the author too, whose
latest is already open in their editor |
| Duplicate | the same, title and description included |
| `/workflow_name`, `/workflow_description` | the frozen values |
| the size a listing shows | measured on the copy that listing opens |
A workflow that follows the author's latest — every workflow today — is
served exactly what it is served now.
## Tests
+18 backend cases: the published version reaching a stranger while the
author keeps their own; a collaborator tracking the author's latest as they
keep editing; clone and duplicate taking the published copy, including its name
and description; a private workflow still cloning its working copy; the size of
each of the three cases; and that a public copy of a workflow that is not
public is refused rather than falling through.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]