Harden Unified Search results, navigation and thumbnails

未关闭
#9,068 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
15/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
活跃
技术栈
php, typescript

调研方向

Start with formatResult() in lib/Search/FileSearchProvider.php, then read the thumbnail path in getThumbnailByFileId() in lib/Controller/FileController.php and the routes in src/router/router.ts. The issue asks for a documented result contract and per-role navigation, which needs a design decision before code. Done means the acceptance criteria hold, with tests for owner, signer, observer and unrelated-user cases.

由索引模型根据 Issue 内容生成。

描述

backend enhancement php

Goal

Return lightweight, privacy-preserving Unified Search entries that navigate correctly for the authenticated participant.

Starting points

  • lib/Search/FileSearchProvider.php::formatResult()
  • lib/Controller/PageController.php
  • lib/Controller/FileController.php::getThumbnailByFileId()
  • src/router/router.ts

Requirements

  • Define the minimal result fields required by Nextcloud Unified Search.
  • Distinguish LibreSign document IDs, Nextcloud node IDs and UUIDs.
  • Avoid exposing the owner's internal filesystem path to unrelated participant accounts.
  • Build navigation URLs appropriate to document type, participant role and signing state.
  • Preserve existing document authorization at destination endpoints.
  • Reuse the existing mimeFallback capability for lightweight PDF search thumbnails.
  • Handle envelopes and documents without an accessible Nextcloud node.
  • Avoid returning sensitive information through result attributes or error messages.
  • Preserve existing full-preview behavior outside search.

Acceptance criteria

  • Authorized owners, signers and observers receive appropriate metadata.
  • Result URLs open the intended authorized workflow.
  • Unrelated users cannot obtain private metadata through search or thumbnail requests.
  • IDs and attributes follow a documented, unambiguous contract.
  • Search thumbnail requests avoid unnecessary PDF preview generation.
  • Missing files and unavailable thumbnails degrade safely.
  • Unit and integration tests cover positive and negative cases.
  • Existing validation and signing behavior remains unchanged.

Implementation guidance

Prefer small changes to the existing provider and controllers.

A dedicated search-result projection is acceptable if it reduces unnecessary entity hydration or filesystem access. Do not introduce a new presentation framework without evidence of need.

Use the authorization behavior established by the participant-visibility work.

主要语言
PHP
星标
844
派生
176
平均合并
14 小时 3 分钟
30 天内合并 PR
344

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

LibreSign/libresign 的其他 Issue

查看 LibreSign/libresign 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。