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
165 stars 37 forks source link

feat: configure it with multiple policies #176

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');

hsluoyz commented 3 years ago

@Gabriel-403 remove:

image