[PR #898] [MERGED] fix: Prevent users from bypassing document limitations via templates #1238

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/898
Author: @ashrafchowdury
Created: 2/1/2024
Status: Merged
Merged: 2/2/2024
Merged by: @dguyen

Base: mainHead: fix/883-document-limitation-bypass


📝 Commits (3)

📊 Changes

2 files changed (+27 additions, -2 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/templates/data-table-templates.tsx (+20 -2)
📝 packages/trpc/server/template-router/router.ts (+7 -0)

📄 Description

Description

Fixed document limitation bypassing issues through templates. Previously, users could bypass document restrictions by utilizing templates even after reaching their limitations. This fix ensures that templates will no longer function as a workaround when users reach their document limits.

Changes

  1. imported useLimits hook on data-table-templates.tsx
  2. Disabled the 'Use Template' button when the user reaches their limit.
  3. Added an Alert Component on top of the templates page to notify users that they can't use templates anymore because they have reached their limit.
  4. Used getServerLimits hook on template-router to a condition on the server.

Example

image

Issue

Closes #883


🔄 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/898 **Author:** [@ashrafchowdury](https://github.com/ashrafchowdury) **Created:** 2/1/2024 **Status:** ✅ Merged **Merged:** 2/2/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/883-document-limitation-bypass` --- ### 📝 Commits (3) - [`420671d`](https://github.com/documenso/documenso/commit/420671dc4b48cb3577a863e57c465b13e66c013c) fix: fixed documents limitation bypass - [`d3a230a`](https://github.com/documenso/documenso/commit/d3a230a0068b05ab5f8e63350a97892a23649a3b) refactor: refactored template document condition - [`d77aa41`](https://github.com/documenso/documenso/commit/d77aa4141a79d5752cea0a4e533be8aced1aecf3) Merge branch 'main' of https://github.com/ashrafchowdury/documenso into fix/883-document-limitation-bypass ### 📊 Changes **2 files changed** (+27 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/templates/data-table-templates.tsx` (+20 -2) 📝 `packages/trpc/server/template-router/router.ts` (+7 -0) </details> ### 📄 Description ## Description **Fixed document limitation bypassing issues through templates.** Previously, users could bypass document restrictions by utilizing templates even after reaching their limitations. This fix ensures that templates will no longer function as a workaround when users reach their document limits. ## Changes 1. imported `useLimits` hook on `data-table-templates.tsx` 2. Disabled the 'Use Template' button when the user reaches their limit. 3. Added an Alert Component on top of the templates page to notify users that they can't use templates anymore because they have reached their limit. 4. Used `getServerLimits` hook on `template-router` to a condition on the server. ## Example ![image](https://github.com/documenso/documenso/assets/87828904/275e83ea-ca7b-4b0e-83f4-ac10da9aff6a) ## Issue Closes #883 --- <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:25 +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#1238
No description provided.