[PR #1894] [MERGED] fix(sharing): use the highest team sharing permission when sharing the same project with multiple teams #3766

Closed
opened 2026-03-22 14:53:32 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1894
Author: @kolaente
Created: 11/27/2025
Status: Merged
Merged: 11/27/2025
Merged by: @kolaente

Base: mainHead: fix/team-sharing-permission


📝 Commits (7)

📊 Changes

2 files changed (+715 additions, -6 deletions)

View changed files

📝 pkg/models/project_permissions.go (+13 -6)
pkg/models/project_permissions_multiple_teams_test.go (+702 -0)

📄 Description

Summary by CodeRabbit

  • Bug Fixes

    • Improved permission evaluation so users who belong to multiple teams receive the correct effective permission (the highest level across teams), fixing inconsistent access calculations.
  • Tests

    • Added thorough tests covering multiple-team permission scenarios, order-of-sharing cases, and verification that admin/write/read precedence and propagation behave consistently.

✏️ Tip: You can customize this high-level summary in your review settings.


🔄 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/go-vikunja/vikunja/pull/1894 **Author:** [@kolaente](https://github.com/kolaente) **Created:** 11/27/2025 **Status:** ✅ Merged **Merged:** 11/27/2025 **Merged by:** [@kolaente](https://github.com/kolaente) **Base:** `main` ← **Head:** `fix/team-sharing-permission` --- ### 📝 Commits (7) - [`e4b2f7a`](https://github.com/go-vikunja/vikunja/commit/e4b2f7ab957521841b3087c663a6591b68782d6d) wip: add failing test - [`0674a69`](https://github.com/go-vikunja/vikunja/commit/0674a6913fadd4697e99bd0f8b8660e559a7d0d7) cleanup test - [`72ac29e`](https://github.com/go-vikunja/vikunja/commit/72ac29e52be49b327ebdf02bace1400c6fd24a10) fix: use max permission - [`a97e5f9`](https://github.com/go-vikunja/vikunja/commit/a97e5f96a98c921088906fb8ce8602ee709b21c1) fix: number of args - [`3dce465`](https://github.com/go-vikunja/vikunja/commit/3dce46571be9ebd55d0519c356772748e66590d3) cleanup - [`5a9b667`](https://github.com/go-vikunja/vikunja/commit/5a9b667bb670bb01db168cdd35fdec843baace34) test more - [`db8d21d`](https://github.com/go-vikunja/vikunja/commit/db8d21d7837d4d14877ee508dba944ab580b7a34) fix test ### 📊 Changes **2 files changed** (+715 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `pkg/models/project_permissions.go` (+13 -6) ➕ `pkg/models/project_permissions_multiple_teams_test.go` (+702 -0) </details> ### 📄 Description <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved permission evaluation so users who belong to multiple teams receive the correct effective permission (the highest level across teams), fixing inconsistent access calculations. * **Tests** * Added thorough tests covering multiple-team permission scenarios, order-of-sharing cases, and verification that admin/write/read precedence and propagation behave consistently. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- 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>
GiteaMirror added the pull-request label 2026-03-22 14:53:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#3766