Skip to content

Conversation

pYassine
Copy link
Contributor

No description provided.

@revu-bot revu-bot bot requested a review from revu-bot September 24, 2025 14:51
@pYassine pYassine marked this pull request as ready for review September 24, 2025 14:59
Copy link
Collaborator

@revu-bot revu-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR improves authorization controls by adding role-based restrictions to document operations and refactoring decision-making permissions. The changes include proper role decorators for structure document endpoints and a new centralized permission system for user decisions. The code is well-structured with comprehensive test coverage, though there are some minor issues with error handling and code organization.

Copy link

@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.40%. Comparing base (d3c975e) to head (3248c60).

Files with missing lines Patch % Lines
...ackend/src/auth/guards/usager-note-access.guard.ts 0.00% 2 Missing ⚠️
...usagers/controllers/usagers-decision.controller.ts 33.33% 1 Missing and 1 partial ⚠️
...backend/src/usagers/utils/validate-search-field.ts 75.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3934      +/-   ##
==========================================
- Coverage   65.40%   65.40%   -0.01%     
==========================================
  Files         964      967       +3     
  Lines       16471    16475       +4     
  Branches     2283     2275       -8     
==========================================
+ Hits        10773    10775       +2     
- Misses       5356     5358       +2     
  Partials      342      342              
Files with missing lines Coverage Δ
...structures/controllers/structure-doc.controller.ts 34.28% <ø> (ø)
packages/backend/src/usagers/decorators/index.ts 100.00% <100.00%> (ø)
...gers/decorators/validate-search-field.decorator.ts 86.66% <100.00%> (ø)
...kages/backend/src/usagers/dto/search-usager.dto.ts 95.45% <100.00%> (ø)
...ges/backend/src/usagers/guards/can-add-decision.ts 100.00% <100.00%> (ø)
packages/backend/src/usagers/guards/index.ts 100.00% <100.00%> (ø)
packages/backend/src/usagers/utils/index.ts 0.00% <ø> (-100.00%) ⬇️
...ackend/src/auth/guards/usager-note-access.guard.ts 77.27% <0.00%> (-3.68%) ⬇️
...usagers/controllers/usagers-decision.controller.ts 38.46% <33.33%> (+3.16%) ⬆️
...backend/src/usagers/utils/validate-search-field.ts 78.94% <75.00%> (-2.88%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3c975e...3248c60. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pYassine pYassine merged commit 2813411 into master Sep 24, 2025
18 of 19 checks passed
@pYassine pYassine deleted the fix-rights-decisions branch September 24, 2025 15:18
@tokenbureau
Copy link

tokenbureau bot commented Sep 24, 2025

🎉 This PR is included in version 2.221.7 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@tokenbureau tokenbureau bot added the released label Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants