Move existing certificate controls into a dedicated My certificates view

Đang mở
#9,471 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

  • #9476 của @ajendras — đã đóng, không merge

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation, frontend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
PHP
Star
844
Fork
176
Merge trung bình
14 giờ 3 phút
Pull request đã merge (30 ngày)
344

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của LibreSign/libresign

Tất cả issue của LibreSign/libresign

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.