~cjwatson/launchpad:fix-ui-oci-reg-creds

Last commit made on 2020-05-11
Get this branch:
git clone -b fix-ui-oci-reg-creds https://git.launchpad.net/~cjwatson/launchpad
Only Colin Watson can upload to this branch. If you are Colin Watson please log in for upload directions.

Branch merges

Branch information

Name:
fix-ui-oci-reg-creds
Repository:
lp:~cjwatson/launchpad

Recent commits

4f6539f... by Colin Watson

Fix OCIEditRegistryCredentialsView field handling

This reworks the field layout and parsing along the same lines as the
similar table in GitRepositoryPermissionsView.

The update logic is now easier to follow, because the business of
parsing data from the form is separated from the business of applying
the changes to the database. Updates are done by iterating over the
parsed form rather than iterating over the existing credentials, because
there's no guarantee that the latter match what existed at the time the
form was generated, and we check for mismatches (of the form of an
attempt to update a credentials row with a nonexistent ID or one that
isn't owned by the context person).

The template now has a way to get hold of the widgets for a given
OCIRegistryCredentials object, rather than trying to reuse the same
widgets on each row of the table.

888a009... by Colin Watson

Add missing "field." prefix

zope.formlib widgets add a "field." prefix to the rendered name by
default.

1a9f33f... by Colin Watson

Cache OCIEditRegistryCredentialsView.oci_registry_creds

7d3bcc9... by Colin Watson

Explicitly mark fields as readonly=False

faf9002... by Colin Watson

Simplify OCIEditRegistryCredentialsView.setUpFields

It's easier to do all the FormFields construction at the end.

I grouped the fields by function because that makes it easier to
configure widgets for all fields of a particular type in future.

bb1eb70... by Colin Watson

Fix incorrect field names in TestOCIRegistryCredentialsView

08bd3a7... by Colin Watson

Remove unnecessary removals of security proxies

This is a bad habit to be in, even during development, because it can
result in security vulnerabilities. It's best to only remove security
proxies with a specific justification.

5899320... by Colin Watson

Fix field naming in TestOCIRegistryCredentialsView

This view's fields are named using the registry credentials ID, not a
push rule ID.

4b7cf6f... by Colin Watson

Fix some inconsistencies in TestOCIRegistryCredentialsView

da8f3bf... by Colin Watson

Add missing nocall: to url widget