Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds accessibleBy and accessibleFieldsBy to casl-mongoose #880

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

stalniy
Copy link
Owner

@stalniy stalniy commented Feb 14, 2024

BREAKING CHANGE: preparation to remove deprecated mongoose plugins

  • accessibleBy is now just a POJO which has ofType method to get query for specific type
  • mongoose accessibleRecordsPlugin doesn't throw exception anymore if ability forbids to do an action and instead it sends empty result query to MongoDB

@codecov-commenter
Copy link

codecov-commenter commented Feb 23, 2024

Codecov Report

Attention: Patch coverage is 91.42857% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 90.56%. Comparing base (e076b31) to head (d818062).
Report is 78 commits behind head on master.

Files Patch % Lines
packages/casl-mongoose/src/accessibleFieldsBy.ts 77.77% 1 Missing and 1 partial ⚠️
...ges/casl-mongoose/src/plugins/accessible_fields.ts 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #880      +/-   ##
==========================================
- Coverage   94.93%   90.56%   -4.38%     
==========================================
  Files          34        4      -30     
  Lines         731       53     -678     
  Branches      175       13     -162     
==========================================
- Hits          694       48     -646     
+ Misses         20        3      -17     
+ Partials       17        2      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

BREAKING CHANGE: preparation to remove deprecated mongoose plugins
  * `accessibleBy` is now just a POJO which has `ofType` method to get query for specific type
  * mongoose `accessibleRecordsPlugin` doesn't throw exception anymore if ability forbids to do an action and instead it sends empty result query to MongoDB
@stalniy stalniy force-pushed the feat/mongoose-accessible branch from a807ac6 to d818062 Compare March 27, 2024 06:09
@stalniy stalniy merged commit 42745d6 into master Mar 27, 2024
6 of 8 checks passed
@stalniy
Copy link
Owner Author

stalniy commented Mar 27, 2024

🚀 Released in @casl/[email protected]

@stalniy
Copy link
Owner Author

stalniy commented Mar 27, 2024

For some reason semantic release ignored my BREAKING CHANGE message. So 7.3.0 was released with this change. I deprecated it because it's wrong

@stalniy stalniy deleted the feat/mongoose-accessible branch March 27, 2024 06:20
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.

2 participants