casbin / casbin.js

An authorization library that supports access control models like ACL, RBAC, ABAC in Frontend Javascript
https://casbin.org/docs/en/frontend
Apache License 2.0
160 stars 37 forks source link

feat: Multiple sections type #179

Closed Gabriel-403 closed 3 years ago

Gabriel-403 commented 3 years ago

1.configure it with multiple policies 2.Add relevant unit tests 3.fix the regular matching problem of RABC 4.Make regular matching more accurate and flexible If you need multiple policy definitions or multiple matcher, you can use like p2, m2. In fact, all of the above four sections can use multiple types and the syntax is r+number, such as r2, e2. By default these four sections should correspond one to one. Such as your r2 will only use matcher m2 to match policies p2.

const enforceContext = new EnforceContext('r2', 'p2', 'e2', 'm2'); or const enforceContext = new NewEnforceContext('2');

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 1.0.0-beta.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: