Skip to content

Create and edit distributions of every plugin with an explicit protection choice - #156

Merged
aevnsvi merged 8 commits into
mainfrom
distribution-form
Nov 22, 2026
Merged

aevnsvi merged 8 commits into
mainfrom
distribution-form

Conversation

@aevnsvi

@aevnsvi aevnsvi commented Nov 22, 2026

Copy link
Copy Markdown

Distributions of every installed plugin can now be created and edited in the UI.

Create (/<plugin>/distribution/new)

  • Name, base path (same rules and reserved prefixes as the repository form), what the distribution serves, the protection and labels.
  • What it serves is a repository of the plugin; for plugins that serve from publications (file, deb, rpm) it can also be one publication of the repository, listed newest first. Python and the plugins that serve versions directly offer the repository only.
  • The protection starts with neither choice made and Create stays off until a content guard is picked or Public is chosen. A plugin that manages the guard itself (container) is sent no guard and the form says so.
  • The name and base path are checked against every plugin's distributions before anything is written; the task is read to its end and the page reports the guard the server really set.
  • The distribution list asks for the plugin first and offers only plugins the user may add to; a repository's Distributions tab opens the form with that repository fixed.

Edit (/<plugin>/distributions/<name>/edit)

  • Only changed fields are sent. Changing what a distribution serves sends the new binding and null for the plugin's other binding fields. Fields the form does not show (remote, uploads, checkpoint, hidden, container fields) are never sent.
  • A distribution that is public opens with nothing chosen and a note; Save needs a guard or an explicit Public. A distribution bound to a repository version keeps it until another binding is chosen. A python distribution bound to a deprecated publication can be switched to its repository.
  • Edit is offered on the distribution page, per row of the list and per row of the Distributions tab, by the change permission held globally or through a role on that distribution, for every plugin.
  • The python-only edit dialog is removed.

Tests cover the exact create and PATCH bodies, the protection rules, the per-row permissions and the routes.

The form asks for the name, base path, what the distribution serves, the
protection and labels, and a container distribution never sends a content
guard. The test server learns to filter repositories by name and type and to
order publications.
The create form takes a name, a base path under the same rules and reserved
prefixes as the repository form, what the distribution serves (a repository of
the plugin, or for plugins that serve from publications one of the
repository's publications, newest first), the protection and labels. The name
and base path are checked against every plugin's distributions before anything
is written, the task is read to its end and the guard the server really set is
reported. A plugin that manages the guard itself is sent none and the form
says so. Opened from a repository, the repository is fixed.
The list asks for the plugin first and offers only plugins the user may add
distributions to; the repository's Distributions tab opens the form with the
repository chosen, also when it has no distribution yet.
…ions tab

The list's button asks for the plugin and lists only the installed plugins the
user may add distributions to. The tab's button, also on an empty tab, opens
the create form with that repository chosen.
An edit sends only the fields that were changed. Switching what a distribution
serves sends the new binding and null for the plugin's other binding fields. A
public distribution opens with no protection chosen and cannot be saved until
a guard or Public is chosen. A python distribution bound to a publication can
be switched to its repository. Edit is offered per distribution by the change
permission held globally or through a role on that distribution.
The edit form sends only the fields that were changed. Changing what a
distribution serves sends the new binding and null for the plugin's other
binding fields. A distribution that is public opens with no protection chosen
and a note, and cannot be saved until a content guard or Public is chosen.
A python distribution bound to a deprecated publication can be switched to its
repository, a distribution bound to a repository version keeps it until
another binding is chosen, and a plugin that manages the guard itself is sent
none. A field the form does not show is never sent.

Edit is offered on the distribution page, in each row of the distribution list
and in each row of a repository's Distributions tab, by the change permission
held on every distribution or through a role on that distribution, for every
plugin. The python-only dialog and the rule that its permission had to be held
on every distribution are gone.
@aevnsvi
aevnsvi merged commit 08176ef into main Nov 22, 2026
6 checks passed
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