node-casbin icon indicating copy to clipboard operation
node-casbin copied to clipboard

An authorization library that supports access control models like ACL, RBAC, ABAC in Node.js and Browser

Results 52 node-casbin issues
Sort by recently updated
recently updated
newest added

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

enhancement

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:*',...

enhancement

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.

bug

See: https://hasura.io/ ![image](https://user-images.githubusercontent.com/3787410/120090529-f1421780-c135-11eb-80e9-9c83ee75c691.png) 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

enhancement

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()...

question

CasbinJsGetPermissionForUser's Test Failing in frontend.test.ts ![testfail](https://user-images.githubusercontent.com/87603425/150356840-a54c6618-020d-40ae-b6aa-d4feccb70a6c.PNG)

bug

## 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

enhancement

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...

bug

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.

enhancement