github stalniy/casl @casl/ability@7.0.0
@casl/ability: v7.0.0

latest releases: @casl/prisma@2.0.1, @casl/vue@3.0.0, @casl/react@7.0.0...
one month ago

7.0.0 (2026-05-21)

⚠ BREAKING CHANGES

  • .possibleRulesFor and .rulesFor return readonly Rule[] type
  • this function is unused in userland and mostly was needed to restore ForbiddenError state in tests
  • renames PureAbility to Ability and dops default options. In order, to get the previous behavior of Ability class, clients are expected to use createMongoAbility and MongoAbility type
  • Ability matching now treats conditions that semantically match everything the same as rules without conditions.
  • rulesToQuery has been replaced with rulesToCondition

Bug Fixes

  • defensive protection against undefined returned from rule conditions matcher (3f0ad4b)
  • deps: upgrades @ucast/* to latest version (#1218) (22b00ff)
  • ensure rules index cache is not polluted with not defined actions (#1228) (89c19ba)
  • treats empty conditions object as matches all (#1198) (cedc463), closes #684
  • ensure that rulesToQuery and rulesToAST generate condition that respect rule priority (#1193)

Code Refactoring

  • removes getDefaultErrorMessage exported function as unneeded (#1206) (3f56353)
  • renames PureAbility to Ability (#1205) (97beee4)

Don't miss a new casl release

NewReleases is sending notifications on new releases.