Skip to content

v2.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 Jul 20:11
· 35 commits to master since this release

2.0.0 (2023-07-25)

Migrate Guide

https://github.com/casbin/Casbin.NET/wiki/Migrate-from-Casbin.NET-v1.x-to-v2.0

Compatibility

Plugins of the same major version are compatible with each other,
The v2.0 of Casbin.NET.Adapter.EFCore and Casbin.AspNetCore will release soon.

Bug Fixes

  • Change Casbin.Exstention to Casbin (26d6099)
  • Change load policy receiver to IReadOnlyAdapter (951ceb8)
  • Change lowest TFM form net45 to net452 (51574eb)
  • Change to persist policy (36cff41)
  • Concurrent error caused by GFunctionCache. (25e0b68)
  • Enable the comment in model config files. (016a57c)
  • err filter logic (b498d7a)
  • error has adapter value (820900f)
  • Error logging lowest version at .NET 6.0 (6cd7181)
  • Get policy error at test helper (8c8105d)
  • HasAdapter value error (67e927a)
  • Make assertion properties to read-only for public (48b9958)
  • Make expression cache thread safe (#261) (e65b782)
  • Make function map internal and remove unused func class (0e69ba8)
  • Make request values not readonly and fix dir typos (a9fb8c1)
  • Reduce the severity of request and policy count validation (ce6e971)
  • Support .NET 7 on azure pipeline (70474ee)
  • Warning at policy scanner (#307) (071af63)

Code Refactoring

  • Improve the extendibility structure (67c7ea5)
  • Integrate RBAC API and Management API to one Enforcer (6a250d5)
  • Make Utility class to internal (9f0255d)
  • Remove obsolete APIs (4049675)

Features

  • Compatible with IEffector of golang casbin and refactor internal enforce method (1c4ade3)
  • add automatic parallel test helper. (3e53c16)
  • Add document symbol and source link to nuget package (dbe2499)
  • Add generic request and policy type (42c4604)
  • Add GetPolicyTypes APIs of IReadOnlyPolicyStore (a6c464e)
  • Add globMatch as a global built-in matcher function (#232) (26bc240), closes #231
  • Add go like method (2884c22)
  • add keyGet function and correponding test. (723e0dd)
  • add keyGet2 and corresponding test. (#280) (d2d245f)
  • add keyGet3 and correponding test. (#294) (bec496a)
  • Add keymatch5 for ignoring params in url (c29c95f)
  • Add lazyLoadPolicy option on enforcer constructor (25b43dc)
  • Add list request values (#303) (f6bb3c1)
  • Add load and save policy to policy manager (a7edb11)
  • Add policy filter (8a77971)
  • Add priority sort with subject hierarchy. (d754c30)
  • Add SDK global json config (5c007fd)
  • Add stream adapter. (#299) (7537539)
  • Add string request and policy values (aa73b71)
  • Add TrySetValue API in request values (15b28ee)
  • Add UpdatePolicy and UpdatePolicies APIs (5226a5b)
  • Add WatcherEx support (bd9ff64)
  • Add WatcherMessage for watchers (eb28952)
  • Add WatcherMessage for watchers (cc1ce45)
  • Better support tokens with substring relation and use two more complex test cases (#319) (520bb17), closes #305
  • Cache the model parse result (401524c)
  • Change enforcer options action to options (d7a0a4f)
  • change lazyLoadPolicy to AutoLoadPolicy. (394ff02)
  • Enable package validation (e098a5b)
  • Expose some model extensions APIs (d68c806)
  • Implement priority explicit deny override model for v2 and add enforce session (114fff2)
  • Make expression handler stateless (1003f5b)
  • Move functions from Casbin.Util to Casbin.Functions (285003b)
  • Multiple request, policy, effect, matcher type support (7078dab)
  • Reading cache before create context (6f0284d)
  • refactor section assertion and policy store (#283) (d5115d2)
  • Remove unused effect chain (f1b85bf)
  • Return effect policies at RemoveFilteredPolicy (171ae6e)
  • Store policy text in the policy values instance (6482ca2)
  • Support .NET 7.0 target (6c286b6)
  • Support .NET 8.0 target (04b5605)
  • Support batch enforce and add corresponding test. (#274) (ac0d6de)
  • Support full-fledged CSV parser in built-in file adapter (fe9c386)
  • support in operator in model config. (cb477ed)
  • Support multi-line mode with '' line feeds (#322) (522bb58)
  • Support thread-safe policy management (849c632)
  • Update to the latest packages (1dc6440)
  • Use different chain effector instances every enforce (ea5d000)
  • Use interface instead of expection to check support APIs in IAdapter (e498016)
  • Use PolicyValues at models instead of IEnumerable (1a756d5)
  • Use values at enforcer extensions (9676ef3)

Performance Improvements

  • Add some ref and inline declare (151a2ea)
  • Avoid to create unnecessary list or array instance (252b1a2)

BREAKING CHANGES

  • feat: Multiple request, policy, effect, matcher type support

Signed-off-by: Sagilio Sagilio@outlook.com

  • Make Utility class to internal

Signed-off-by: Sagilio Sagilio@outlook.com

  • Remove obsolete APIs

Signed-off-by: Sagilio Sagilio@outlook.com

  • Improve the extendibility structure

Signed-off-by: Sagilio Sagilio@outlook.com

  • Integrate BAC API and Management API to one Enforcer

Signed-off-by: Sagilio Sagilio@outlook.com