[PR #1051] [MERGED] fix: mask recipient token #1346

Closed
opened 2026-02-26 19:32:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1051
Author: @catalinpit
Created: 3/22/2024
Status: Merged
Merged: 4/15/2024
Merged by: @dguyen

Base: mainHead: fix/delete-endpoint-hide-recipients


📝 Commits (4)

  • e5b130e fix: mask recipient token
  • fcad178 chore: build the path and value on the backend
  • 4ebede0 Merge branch 'main' into fix/delete-endpoint-hide-recipients
  • 9ca118b chore: merged main

📊 Changes

3 files changed (+18 additions, -25 deletions)

View changed files

📝 apps/web/src/components/(dashboard)/common/command-menu.tsx (+3 -17)
📝 packages/lib/server-only/document/search-documents-with-keyword.ts (+14 -8)
📝 packages/trpc/server/document-router/router.ts (+1 -0)

📄 Description

The searchDocuments function is used for the shortcuts commands, afaik. The function returns the documents that match the user query (if any), alongside all their recipients.

The reason for that is so it can build the path for the document. E.g. if you're the document owner, the document path will be ..../documents/{id}. But if you're a signer for example, the document path (link) will be ..../sign/{token}.

So instead of doing that on the frontend, I moved it to the backend.

At least that's what I understood. If I'm wrong, please correct me.

Summary by CodeRabbit

  • New Features
    • Enhanced the CommandMenu component to simplify search result generation and improve document link management based on user roles.
  • Refactor
    • Updated document search logic to include recipient token masking and refined document mapping.
  • Style
    • Minor formatting improvement in document routing code.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1051 **Author:** [@catalinpit](https://github.com/catalinpit) **Created:** 3/22/2024 **Status:** ✅ Merged **Merged:** 4/15/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/delete-endpoint-hide-recipients` --- ### 📝 Commits (4) - [`e5b130e`](https://github.com/documenso/documenso/commit/e5b130e22f5464cf5d36e2b2ac05ba5b7c638663) fix: mask recipient token - [`fcad178`](https://github.com/documenso/documenso/commit/fcad178f0cb670393586286662dbf008170e7884) chore: build the path and value on the backend - [`4ebede0`](https://github.com/documenso/documenso/commit/4ebede053fdc7d3a3f7e2ec31d8da96f827222b6) Merge branch 'main' into fix/delete-endpoint-hide-recipients - [`9ca118b`](https://github.com/documenso/documenso/commit/9ca118b0e3edfcb7ca4b8cb551210e0d8514ca08) chore: merged main ### 📊 Changes **3 files changed** (+18 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/components/(dashboard)/common/command-menu.tsx` (+3 -17) 📝 `packages/lib/server-only/document/search-documents-with-keyword.ts` (+14 -8) 📝 `packages/trpc/server/document-router/router.ts` (+1 -0) </details> ### 📄 Description The searchDocuments function is used for the shortcuts commands, afaik. The function returns the documents that match the user query (if any), alongside all their recipients. The reason for that is so it can build the path for the document. E.g. if you're the document owner, the document path will be `..../documents/{id}`. But if you're a signer for example, the document path (link) will be `..../sign/{token}`. So instead of doing that on the frontend, I moved it to the backend. At least that's what I understood. If I'm wrong, please correct me. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced the `CommandMenu` component to simplify search result generation and improve document link management based on user roles. - **Refactor** - Updated document search logic to include recipient token masking and refined document mapping. - **Style** - Minor formatting improvement in document routing code. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:32:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1346
No description provided.