Skip to content

feat: prevent users from removing themselves from team#304

Open
7eliassen wants to merge 1 commit into
mainfrom
feat/user-cannot-remove-himself-from-team
Open

feat: prevent users from removing themselves from team#304
7eliassen wants to merge 1 commit into
mainfrom
feat/user-cannot-remove-himself-from-team

Conversation

@7eliassen

Copy link
Copy Markdown
Contributor

Adds a check in the note settings router to prevent a user from removing themselves from the note's team. If request.userId matches request.body.userId, the request is rejected with a 403 Forbidden response.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 85.76% (🎯 80%)
⬇️ -0.01%
9283 / 10824
🔵 Statements 85.76% (🎯 80%)
⬇️ -0.01%
9283 / 10824
🔵 Functions 79.55% (🎯 80%)
🟰 ±0%
284 / 357
🔵 Branches 84.65% (🎯 80%)
⬇️ -0.13%
469 / 554
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/presentation/http/router/noteSettings.ts 98.43%
⬇️ -0.51%
81.25%
⬇️ -4.46%
100%
🟰 ±0%
98.43%
⬇️ -0.51%
207-208, 213-214, 279-280
Generated in workflow #927 for commit 922f29f by the Vitest Coverage Report Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants