[PR #1262] [MERGED] feat: document visibility #1519

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1262
Author: @catalinpit
Created: 7/30/2024
Status: Merged
Merged: 9/16/2024
Merged by: @Mythie

Base: mainHead: feat/document-visibility-scope-per-role


📝 Commits (10+)

  • 7521daa feat: document visibility
  • 84f258f feat: make the feature work
  • 1e20168 feat: restrict document access for unauthorized users
  • c784733 feat: set visibility to everyone on document creation
  • cf7e567 feat: backend checks for permission and code restructuring
  • fa734cc feat: count the correct docs
  • 52fc10d feat: code cleanup
  • 43d2643 feat: some code refactoring
  • 8e599f1 feat: avoid mixing team and personal documents
  • f871b17 feat: code refactor and document visibility enums

📊 Changes

32 files changed (+1995 additions, -1233 deletions)

View changed files

📝 apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx (+28 -2)
📝 apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx (+2 -0)
📝 apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx (+28 -1)
📝 apps/web/src/app/(dashboard)/documents/documents-page-view.tsx (+6 -2)
📝 apps/web/src/components/document/document-history-sheet.tsx (+17 -0)
📝 apps/web/src/providers/team.tsx (+3 -3)
📝 packages/app-tests/e2e/teams/team-documents.spec.ts (+353 -2)
packages/lib/constants/document-visibility.ts (+23 -0)
📝 packages/lib/server-only/document/find-documents.ts (+56 -5)
📝 packages/lib/server-only/document/get-document-by-id.ts (+40 -1)
📝 packages/lib/server-only/document/get-stats.ts (+51 -1)
📝 packages/lib/server-only/document/update-document-settings.ts (+19 -0)
📝 packages/lib/server-only/team/get-team.ts (+2 -0)
📝 packages/lib/translations/de/common.po (+177 -185)
📝 packages/lib/translations/de/marketing.js (+1 -1)
📝 packages/lib/translations/de/web.js (+1 -1)
📝 packages/lib/translations/de/web.po (+962 -997)
📝 packages/lib/translations/en/common.po (+10 -10)
📝 packages/lib/translations/en/marketing.js (+1 -1)
📝 packages/lib/translations/en/web.js (+1 -1)

...and 12 more files

📄 Description

Summary by CodeRabbit

  • New Features

    • Enhanced document access control with new visibility settings: EVERYONE, MANAGER_AND_ABOVE, and ADMIN.
    • Improved document editing forms to manage visibility settings and user roles.
    • Introduced a component for selecting document visibility settings based on user roles.
  • Bug Fixes

    • Improved user experience with informative access denial messages.
  • Documentation

    • Updated type definitions to reflect new properties and structures for visibility.

🔄 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/1262 **Author:** [@catalinpit](https://github.com/catalinpit) **Created:** 7/30/2024 **Status:** ✅ Merged **Merged:** 9/16/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/document-visibility-scope-per-role` --- ### 📝 Commits (10+) - [`7521daa`](https://github.com/documenso/documenso/commit/7521daa178974a837996cc456846c4cd4c4f011b) feat: document visibility - [`84f258f`](https://github.com/documenso/documenso/commit/84f258f5c9791d7c17c3671dd1332de92d57263a) feat: make the feature work - [`1e20168`](https://github.com/documenso/documenso/commit/1e201687b9eb0086a17f5801c97977bcff4b7679) feat: restrict document access for unauthorized users - [`c784733`](https://github.com/documenso/documenso/commit/c784733f262bbd2a8c64ca39f73bf42b9c188b57) feat: set visibility to everyone on document creation - [`cf7e567`](https://github.com/documenso/documenso/commit/cf7e567d97050b601d5b9635219598523288ddf4) feat: backend checks for permission and code restructuring - [`fa734cc`](https://github.com/documenso/documenso/commit/fa734cc72dd7e4d931d0296014b7a7f8dcfe31c5) feat: count the correct docs - [`52fc10d`](https://github.com/documenso/documenso/commit/52fc10d0016448d3626a6c9e225afa5f299c1c3b) feat: code cleanup - [`43d2643`](https://github.com/documenso/documenso/commit/43d2643c27dcf684e712031c13a1cf7b2b243174) feat: some code refactoring - [`8e599f1`](https://github.com/documenso/documenso/commit/8e599f1c39477ec44a2fbda78aafc2ff691281a3) feat: avoid mixing team and personal documents - [`f871b17`](https://github.com/documenso/documenso/commit/f871b176ed460c911a4be1bf8a202714c0191370) feat: code refactor and document visibility enums ### 📊 Changes **32 files changed** (+1995 additions, -1233 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx` (+28 -2) 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit-document.tsx` (+2 -0) 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx` (+28 -1) 📝 `apps/web/src/app/(dashboard)/documents/documents-page-view.tsx` (+6 -2) 📝 `apps/web/src/components/document/document-history-sheet.tsx` (+17 -0) 📝 `apps/web/src/providers/team.tsx` (+3 -3) 📝 `packages/app-tests/e2e/teams/team-documents.spec.ts` (+353 -2) ➕ `packages/lib/constants/document-visibility.ts` (+23 -0) 📝 `packages/lib/server-only/document/find-documents.ts` (+56 -5) 📝 `packages/lib/server-only/document/get-document-by-id.ts` (+40 -1) 📝 `packages/lib/server-only/document/get-stats.ts` (+51 -1) 📝 `packages/lib/server-only/document/update-document-settings.ts` (+19 -0) 📝 `packages/lib/server-only/team/get-team.ts` (+2 -0) 📝 `packages/lib/translations/de/common.po` (+177 -185) 📝 `packages/lib/translations/de/marketing.js` (+1 -1) 📝 `packages/lib/translations/de/web.js` (+1 -1) 📝 `packages/lib/translations/de/web.po` (+962 -997) 📝 `packages/lib/translations/en/common.po` (+10 -10) 📝 `packages/lib/translations/en/marketing.js` (+1 -1) 📝 `packages/lib/translations/en/web.js` (+1 -1) _...and 12 more files_ </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced document access control with new visibility settings: `EVERYONE`, `MANAGER_AND_ABOVE`, and `ADMIN`. - Improved document editing forms to manage visibility settings and user roles. - Introduced a component for selecting document visibility settings based on user roles. - **Bug Fixes** - Improved user experience with informative access denial messages. - **Documentation** - Updated type definitions to reflect new properties and structures for visibility. <!-- 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:33:36 +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#1519
No description provided.