Skip to content

feat: prevent users from removing themselves from team - #304

Merged
7eliassen merged 2 commits into
mainfrom
feat/user-cannot-remove-himself-from-team
Aug 17, 2026
Merged

feat: prevent users from removing themselves from team#304
7eliassen merged 2 commits 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.78% (🎯 80%)
⬆️ +0.01%
9285 / 10824
🟢 Statements 85.78% (🎯 80%)
⬆️ +0.01%
9285 / 10824
🔴 Functions 79.55% (🎯 80%)
🟰 ±0%
284 / 357
🟢 Branches 84.86% (🎯 80%)
⬆️ +0.08%
471 / 555
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/presentation/http/router/noteSettings.ts 98.95%
⬆️ +0.01%
88.23%
⬆️ +2.52%
100%
🟰 ±0%
98.95%
⬆️ +0.01%
213-214, 279-280
Generated in workflow #928 for commit bfefe60 by the Vitest Coverage Report Action

Comment thread src/presentation/http/router/noteSettings.ts
@7eliassen
7eliassen merged commit 3f50081 into main Aug 17, 2026
7 checks passed
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.

3 participants