node-casbin
node-casbin copied to clipboard
An authorization library that supports access control models like ACL, RBAC, ABAC in Node.js and Browser
There is `updatePolicy()`, but I don't see any update APIs for roles and other grouping policies in node version. Is this going to be implemented? https://casbin.org/docs/en/management-api#updatenamedgroupingpolicy
Example : I have subject admin:create:any , admin:create:own, i need wildcard to get matched subject and then check value is any or own to handle my business logic `getFilteredPolicy(0, 'admin:create:*',...
Hi, Multiline parsing in config.ts is using .includes(), but should use .endsWith(), as the multiline separator is valid only at the end of the line. https://github.com/casbin/node-casbin/blob/7803ccbd4cc25e2faac9b508ef57ebee2f8d5750/src/config.ts#L127 Thanks.
See: https://hasura.io/  We could make a middleware like this: https://github.com/hasura/graphql-engine/blob/71ae144aa623c156064ffe21eb38020ccf315a7a/community/sample-apps/vuejs-auth0-graphql/app/src/auth/authService.js
https://github.com/casbin/node-casbin/blob/f859d105b31668a93f965f1e2d6c3c5cb7f22f3d/src/coreEnforcer.ts#L367 Due to a refactor ~6 months ago, model.buildRoleLinks(rmMap) is called within a loop over rmMap.values() in coreEnforcer.buildRoleLinksInternal(). Not only is this inefficient, but if rmMap is empty then model.buildRoleLinks()...
CasbinJsGetPermissionForUser's Test Failing in frontend.test.ts 
## Authorization middleware ### Supported - [x] https://github.com/koajs/koa - [x] https://github.com/eggjs/egg/ - [x] https://github.com/expressjs/express ### Things to do - [x] https://github.com/nestjs/nest - [x] https://github.com/hapijs/hapi - [ ] https://github.com/meteor/meteor
Fix: https://github.com/casbin/node-casbin/issues/327 When repairing printRoles(), n is' Roles [Map] {} ', resulting in printing failure
Hi! 👋 Firstly, thanks for your work on this project! 🙂 Today I used [patch-package](https://github.com/ds300/patch-package) to patch `[email protected]` for the project I'm working on. Here is the diff that solved...
Nexus.js is a popular GraphQL web framework: https://github.com/graphql-nexus/nexus They are looking for an authz solution: https://github.com/graphql-nexus/nexus/issues/238 We can make a middleware for their scenario.