[PR #1391] [MERGED] feat: add global settings for teams #1604

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1391
Author: @catalinpit
Created: 10/9/2024
Status: Merged
Merged: 11/8/2024
Merged by: @Mythie

Base: mainHead: feat/global-team-settings


📝 Commits (10+)

  • f108db6 feat: add global settings for teams
  • 4a8155a chore: merged main
  • 1a580e7 chore: settings page
  • 86216fc chore: small design changes
  • 48be29f chore: finish ui
  • 30bdc74 chore: improve flow
  • e415917 chore: add backend function
  • d0b4840 chore: include or exclude sender details
  • 74752cd Merge branch 'main' into feat/global-team-settings
  • cd22758 chore: team default settings

📊 Changes

99 files changed (+4364 additions, -1029 deletions)

View changed files

📝 apps/documentation/pages/users/_meta.json (+1 -0)
apps/documentation/pages/users/document-visibility.mdx (+0 -18)
apps/documentation/pages/users/teams/_meta.json (+5 -0)
apps/documentation/pages/users/teams/document-visibility.mdx (+45 -0)
apps/documentation/pages/users/teams/general-settings.mdx (+15 -0)
apps/documentation/pages/users/teams/sender-details.mdx (+14 -0)
📝 apps/documentation/public/teams/document-visibility-settings.webp (+0 -0)
apps/documentation/public/teams/team-general-settings-document-visibility-select.webp (+0 -0)
apps/documentation/public/teams/team-general-settings.webp (+0 -0)
📝 apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx (+1 -1)
📝 apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx (+1 -1)
📝 apps/web/src/app/(teams)/t/[teamUrl]/settings/page.tsx (+7 -1)
apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/branding-preferences.tsx (+319 -0)
apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/document-preferences.tsx (+235 -0)
apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx (+52 -0)
📝 apps/web/src/components/(teams)/forms/update-team-form.tsx (+105 -3)
📝 apps/web/src/components/(teams)/settings/layout/desktop-nav.tsx (+16 -1)
📝 apps/web/src/components/(teams)/settings/layout/mobile-nav.tsx (+17 -1)
apps/web/src/pages/api/branding/logo/team/[teamId].ts (+59 -0)
📝 packages/app-tests/e2e/document-auth/action-auth.spec.ts (+4 -4)

...and 79 more files

📄 Description

Description

This PR introduces global settings for teams. At the moment, it allows team admins to configure the following:

  • The default visibility of the documents uploaded to the team account
  • Whether to include the document owner (sender) details when sending emails to the recipients.

Include Sender Details

If the Sender Details setting is enabled, the emails sent by the team will include the sender's name:

"Example User" on behalf of "Example Team" has invited you to sign "document.pdf"

Otherwise, the email will say:

"Example Team" has invited you to sign "document.pdf"

Default Document Visibility

This new option allows users to set the default visibility for the documents uploaded to the team account. It can have the following values:

  • Everyone
  • Manager and above
  • Admins only

If the default document visibility isn't set, the document will be set to the role of the user who created the document:

  • If a user with the "User" role creates a document, the document's visibility is set to "Everyone".
  • Manager role -> "Manager and above"
  • Admin role -> "Admins only"

Otherwise, if there is a default document visibility value, it uses that value.

Gotcha

To avoid issues, the document owner and the recipient can access the document irrespective of their role. For example:

  • If a team member with the role "Member" uploads a document and the default document visibility is "Admins", only the document owner and admins can access the document.

    • Similar to the other scenarios.
  • If an admin uploads a document and the default document visibility is "Admins", the recipient can access the document.

  • The admins have access to all the documents.

  • Managers have access to documents with the visibility set to "Everyone" and "Manager and above"

  • Members have access only to the documents with the visibility set to "Everyone".

Testing Performed

Tested it locally.

Checklist

  • I have tested these changes locally and they work as expected.
  • I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a new setting for document visibility and sender details within team settings.
    • Added flexibility in email invitations by allowing inclusion of sender details based on team settings.
    • Enhanced documentation with new pages on General Settings, Document Visibility, and Email Sender Details.
    • Added support for branding settings, allowing teams to customize email templates with logos and company details.
    • Implemented new methods for updating team branding and document settings.
    • Introduced functionality for managing team branding preferences and document preferences through new components and API endpoints.
  • Bug Fixes

    • Improved access control logic for document visibility based on user roles.
  • Translations

    • Expanded localization support with new translations for German, French, Spanish, and English, including updates for document invitations and team actions.
  • Tests

    • Added new test cases to ensure functionality of team settings and document visibility rules.

🔄 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/1391 **Author:** [@catalinpit](https://github.com/catalinpit) **Created:** 10/9/2024 **Status:** ✅ Merged **Merged:** 11/8/2024 **Merged by:** [@Mythie](https://github.com/Mythie) **Base:** `main` ← **Head:** `feat/global-team-settings` --- ### 📝 Commits (10+) - [`f108db6`](https://github.com/documenso/documenso/commit/f108db6e3461ad38ba090a5a09f9a1830ea24271) feat: add global settings for teams - [`4a8155a`](https://github.com/documenso/documenso/commit/4a8155a1a93375d4d0c0d55ac24173694d01faa1) chore: merged main - [`1a580e7`](https://github.com/documenso/documenso/commit/1a580e7a294e42fa17bf6524f1370122e52a048d) chore: settings page - [`86216fc`](https://github.com/documenso/documenso/commit/86216fc1aa24f36d027bdfc67b163d14f1e25551) chore: small design changes - [`48be29f`](https://github.com/documenso/documenso/commit/48be29f93d73445fee9f88bf86a69a4abf2cdf13) chore: finish ui - [`30bdc74`](https://github.com/documenso/documenso/commit/30bdc7404ff03fac9348aad8c7ffb3fb44c89fd9) chore: improve flow - [`e415917`](https://github.com/documenso/documenso/commit/e415917a138a41ddf043955b49310b4057b90fac) chore: add backend function - [`d0b4840`](https://github.com/documenso/documenso/commit/d0b4840af1cdcfb226bfcbacb0dae6336f014204) chore: include or exclude sender details - [`74752cd`](https://github.com/documenso/documenso/commit/74752cdf78f5d836ede9530944acdf12a69f0f8d) Merge branch 'main' into feat/global-team-settings - [`cd22758`](https://github.com/documenso/documenso/commit/cd227585c1e1894c5858c38ebef2293b1d0d220c) chore: team default settings ### 📊 Changes **99 files changed** (+4364 additions, -1029 deletions) <details> <summary>View changed files</summary> 📝 `apps/documentation/pages/users/_meta.json` (+1 -0) ➖ `apps/documentation/pages/users/document-visibility.mdx` (+0 -18) ➕ `apps/documentation/pages/users/teams/_meta.json` (+5 -0) ➕ `apps/documentation/pages/users/teams/document-visibility.mdx` (+45 -0) ➕ `apps/documentation/pages/users/teams/general-settings.mdx` (+15 -0) ➕ `apps/documentation/pages/users/teams/sender-details.mdx` (+14 -0) 📝 `apps/documentation/public/teams/document-visibility-settings.webp` (+0 -0) ➕ `apps/documentation/public/teams/team-general-settings-document-visibility-select.webp` (+0 -0) ➕ `apps/documentation/public/teams/team-general-settings.webp` (+0 -0) 📝 `apps/web/src/app/(dashboard)/documents/[id]/document-page-view.tsx` (+1 -1) 📝 `apps/web/src/app/(dashboard)/documents/[id]/edit/document-edit-page-view.tsx` (+1 -1) 📝 `apps/web/src/app/(teams)/t/[teamUrl]/settings/page.tsx` (+7 -1) ➕ `apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/branding-preferences.tsx` (+319 -0) ➕ `apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/document-preferences.tsx` (+235 -0) ➕ `apps/web/src/app/(teams)/t/[teamUrl]/settings/preferences/page.tsx` (+52 -0) 📝 `apps/web/src/components/(teams)/forms/update-team-form.tsx` (+105 -3) 📝 `apps/web/src/components/(teams)/settings/layout/desktop-nav.tsx` (+16 -1) 📝 `apps/web/src/components/(teams)/settings/layout/mobile-nav.tsx` (+17 -1) ➕ `apps/web/src/pages/api/branding/logo/team/[teamId].ts` (+59 -0) 📝 `packages/app-tests/e2e/document-auth/action-auth.spec.ts` (+4 -4) _...and 79 more files_ </details> ### 📄 Description ## Description This PR introduces global settings for teams. At the moment, it allows team admins to configure the following: * The default visibility of the documents uploaded to the team account * Whether to include the document owner (sender) details when sending emails to the recipients. ### Include Sender Details If the Sender Details setting is enabled, the emails sent by the team will include the sender's name: > "Example User" on behalf of "Example Team" has invited you to sign "document.pdf" Otherwise, the email will say: > "Example Team" has invited you to sign "document.pdf" ### Default Document Visibility This new option allows users to set the default visibility for the documents uploaded to the team account. It can have the following values: * Everyone * Manager and above * Admins only If the default document visibility isn't set, the document will be set to the role of the user who created the document: * If a user with the "User" role creates a document, the document's visibility is set to "Everyone". * Manager role -> "Manager and above" * Admin role -> "Admins only" Otherwise, if there is a default document visibility value, it uses that value. #### Gotcha To avoid issues, the `document owner` and the `recipient` can access the document irrespective of their role. For example: * If a team member with the role "Member" uploads a document and the default document visibility is "Admins", only the document owner and admins can access the document. * Similar to the other scenarios. * If an admin uploads a document and the default document visibility is "Admins", the recipient can access the document. * The admins have access to all the documents. * Managers have access to documents with the visibility set to "Everyone" and "Manager and above" * Members have access only to the documents with the visibility set to "Everyone". ## Testing Performed Tested it locally. ## Checklist <!--- Please check the boxes that apply to this pull request. --> <!--- You can add or remove items as needed. --> - [x] I have tested these changes locally and they work as expected. - [ ] I have added/updated tests that prove the effectiveness of these changes. - [x] I have updated the documentation to reflect these changes, if applicable. - [x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes - **New Features** - Introduced a new setting for document visibility and sender details within team settings. - Added flexibility in email invitations by allowing inclusion of sender details based on team settings. - Enhanced documentation with new pages on General Settings, Document Visibility, and Email Sender Details. - Added support for branding settings, allowing teams to customize email templates with logos and company details. - Implemented new methods for updating team branding and document settings. - Introduced functionality for managing team branding preferences and document preferences through new components and API endpoints. - **Bug Fixes** - Improved access control logic for document visibility based on user roles. - **Translations** - Expanded localization support with new translations for German, French, Spanish, and English, including updates for document invitations and team actions. - **Tests** - Added new test cases to ensure functionality of team settings and document visibility rules. <!-- 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:58 +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#1604
No description provided.