Repository navigation
Create and edit distributions of every plugin with an explicit protection choice - #156
Merged
Merged
Conversation
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.
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.
Distributions of every installed plugin can now be created and edited in the UI.
Create (
/<plugin>/distribution/new)Edit (
/<plugin>/distributions/<name>/edit)Tests cover the exact create and PATCH bodies, the protection rules, the per-row permissions and the routes.