Move existing certificate controls into a dedicated My certificates view

Open
#9,471 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #9476 by @ajendras — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
72/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript

Research direction

Start by reading src/views/Account/Account.vue and src/views/Account/partials/ManagePassword.vue to see which certificate controls and events Account renders. Then check how src/router/router.ts and src/components/Settings/Settings.vue define the existing authenticated routes and navigation items. Done means a new MyCertificates route and nav entry reuse ManagePassword, the certificate block is gone from Account, and the Vitest specs named in the issue pass.

Written by the indexing model from the issue text.

Description

enhancement frontend good first issue javascript

Goal

Create a dedicated My certificates page in LibreSign settings and move the existing single-certificate controls there, without changing how certificates are stored, issued or used for signing.

This is the first, independently reviewable UI step toward multiple personal certificates described in the parent epic. Completing this issue does not mean that multiple certificates are supported yet.

What the user sees today

In Settings > Account (/f/account), the user's name and photo appear alongside a Certificate section. The existing ManagePassword component provides actions to upload, create, read, delete, and change the password of the user's current certificate.

There is no dedicated place to manage certificates; future multiple-certificate functionality would otherwise further crowd the account profile.

Expected behavior after this issue

  1. An authenticated user opens LibreSign settings > My certificates, using an entry alongside Account and Preferences.
  2. The page displays a clear My certificates heading and the existing certificate controls. A user without a stored certificate can still access the existing creation/upload actions, subject to the currently configured engine; a user with one can still read, delete or change its password.
  3. Settings > Account continues to display the user's identity and other existing sections, but no longer embeds certificate controls under the profile photo.
  4. Existing certificate creation, upload, reading, deletion and password-change actions behave exactly as before. No new backend API or certificate data model is required.
  5. This is an internal authenticated settings page, not a public signing page.

Suggested implementation path

All named files already exist unless explicitly marked as new.

  1. Inspect src/views/Account/Account.vue and src/views/Account/partials/ManagePassword.vue to understand the current controls, component state and events.
  2. Add a small view such as src/views/Certificates/MyCertificates.vue (new file), reusing ManagePassword rather than copying its buttons or API requests. A simple title and existing control component are sufficient for this first stage.
  3. Add an authenticated-app route, e.g. /f/certificates named MyCertificates, in src/router/router.ts. Reuse the established internal route conventions.
  4. Add the My certificates entry to src/components/Settings/Settings.vue, following the existing NcAppNavigationItem patterns.
  5. Remove only the certificate block from Account.vue; preserve UserImage, Signatures, Documents and the remaining account details. Adjust styling only where the removed block leaves a layout problem.
  6. Update focused component/navigation tests and the existing user-facing documentation describing where certificate actions are found.

Small UX checkpoint: use the current Nextcloud settings components and provide a screenshot or short screen recording of the old Account and new My certificates screens with synthetic data. Do not redesign certificate operations.

Acceptance criteria

  • My certificates is reachable from the existing authenticated settings navigation and has a clear heading.
  • It shows the existing certificate controls in both "has a certificate" and "no certificate" states without duplicating their logic.
  • Account no longer embeds the certificate controls and still renders the other existing account sections.
  • Existing buttons/modals and their API calls remain unchanged and functional.
  • The new route does not expose account certificate controls on public/unauthenticated signing pages.
  • The page is keyboard-accessible, responsive and uses existing translations/components.
  • The user guide indicates the new navigation path.
  • Focused Vitest tests and frontend checks pass; the PR includes sanitized visual evidence.

Tests / verification

Start with:

  • src/tests/views/Account/Account.spec.ts — account details remain but the certificate block is gone.
  • src/tests/components/Settings/Settings.spec.ts — authenticated navigation includes My certificates.
  • A new src/tests/views/Certificates/MyCertificates.spec.ts — the new view renders the existing control component.
  • Existing src/tests/views/Account/partials/ManagePassword.spec.ts — legacy actions remain covered.

Run the affected Vitest tests (e.g. npx vitest run <spec-paths>), npm run lint, npm run stylelint and npm run ts:check. Manually check an account with and without a certificate in an authorized test environment; do not use real PFX files or identities in screenshots.

What happens next in the epic (NOT part of this issue)

This task establishes where certificate management lives; subsequent work establishes how multiple certificates work:

  1. Backend foundation: a per-user certificate inventory with stable IDs, protected storage references, and safe migration of the current signature.pfx.
  2. Multiple-certificate listing: replace the single-certificate presentation with a list backed by inventory metadata (issuer, validity, organizational context and status).
  3. Per-certificate operations and default: allow inspecting, importing, removing, revoking where appropriate and choosing one default certificate; these actions must address an individual certificate ID.
  4. Signing integration: select an eligible certificate for the request's organizational context when the related issuer/context contracts are ready.

Those steps require separate work and decisions in the parent epic. Do not pre-build a fake certificate list or change the backend in this PR. The maintainer should check that the new page can host the future list, and document any integration considerations in the PR handoff.

Out of scope

Multiple-certificate issuance/import, inventory tables, PFX migration, CRL or revocation changes, new security permissions, sharing/delegation, certificate-default behavior, certificate selection during signing, and policy changes.

Good first issue

This is a focused Vue/TypeScript navigation and component-reuse task. Start with the existing ManagePassword component and the existing Account/Settings tests. No PKI, encryption, database migration or API work is needed. Check for an active PR before starting; coordination is optional, and questions about the small UI boundary are welcome.

Additional context
Dominant language
PHP
Stars
844
Forks
176
Avg merge
14h 3m
Merged PRs (30d)
344

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LibreSign/libresign

All issues in LibreSign/libresign

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.