Skip to content

[feature:gsoc26] Update Django admin for Certificate templates #1357

@stktyagi

Description

@stktyagi

Is your feature request related to a problem? Please describe.
After extending the AbstractTemplate model to support type="cert", the Django admin interface needs to be updated to dynamically expose these new fields so administrators can actually configure them.

Describe the solution you'd like
I will update the TemplateAdmin form and logic to handle the new certificate fields:

  • Show the certificate template type in the admin type dropdown.
  • Show or hide the ca and blueprint_cert fields based on the selected template type.
  • Use raw_id_fields for the ca and blueprint_cert foreign keys to ensure scalability in large deployments.
  • Implement UI filtering using limit_choices_to to ensure only unassigned certificates appear in the blueprint_cert dropdown.
  • Apply organization scoping to ca and blueprint_cert choices.

Device admin visibility

The GSoC proposal test plan includes checking that certificate details are visible in the device admin. If that work is not implemented in this issue, this issue should link to the issue where that admin UI work is tracked.

Tests from the GSoC proposal

  • The Certificate template type appears in the admin type dropdown.
  • CA selection field is shown or hidden based on template type.
  • Blueprint certificate field is shown or hidden and filtered correctly.
  • Certificate details are visible in the device admin, if this remains in scope for this issue.
  • Selenium coverage verifies template type switching shows and hides the relevant fields.

Measurable outcomes: 7
Implementation points: 6, 7

Metadata

Metadata

Assignees

Labels

enhancementgsocPart of a Google Summer of Code project
No fields configured for Feature.

Projects

Status

ToDo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions