Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(docs): Update deprecated 'Ability' class reference #3256

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

Merged

Conversation

cuonglamphu
Copy link
Contributor

@cuonglamphu cuonglamphu commented May 6, 2025

replaced 'Ability' with 'MongoAbility' as the default in CASL v6

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Docs
  • Other... Please describe:

What is the current behavior?

No current behavior to modify. This PR updates documentation.

Issue Number: #2596

What is the new behavior?

The documentation now reflects the change of using MongoAbility as the default in CASL v6 instead of Ability.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

In CASL v6, the MongoAbility class has become the default over the Ability class for better integration with MongoDB-based systems. This change reflects the evolving best practices and optimizations in CASL, allowing for more efficient querying and permission checks when working with MongoDB collections. By replacing Ability with MongoAbility, developers can leverage CASL's built-in MongoDB-specific capabilities, such as optimized querying and smoother integration with MongoDB's native operations.

For more details on how this change improves functionality, refer to the official CASL documentation: https://casl.js.org/

replaced 'Ability' with 'MongoAbility' as the default in CASL v6
@cuonglamphu cuonglamphu marked this pull request as draft May 6, 2025 05:55
@cuonglamphu cuonglamphu marked this pull request as ready for review May 6, 2025 05:55
@kamilmysliwiec kamilmysliwiec merged commit 82b7a35 into nestjs:master May 6, 2025
4 checks passed
@kamilmysliwiec
Copy link
Member

LGTM

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