Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed Node-Casbin directly into Casbin.js #52

Closed
hsluoyz opened this issue Apr 3, 2021 · 1 comment
Closed

Embed Node-Casbin directly into Casbin.js #52

hsluoyz opened this issue Apr 3, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@hsluoyz
Copy link
Member

hsluoyz commented Apr 3, 2021

Currently, Casbin.js is a self-made authorization mechanism called Authorizer, which is much different with Casbin's enforcer.

Now we decided to remove all those stuff and let Casbin.js just be a wrapper of Node-Casbin. Node-Casbin can run both on browser and Node.js. For browser use, it has been used in Casbin online editor: https://github.com/casbin/casbin-editor

But Node-Casbin may need to be adjusted like adding Sync functions, to facilitate the use of frontend.

@hsluoyz hsluoyz self-assigned this Apr 3, 2021
@hsluoyz hsluoyz added the enhancement New feature or request label Apr 3, 2021
@Zxilly
Copy link
Contributor

Zxilly commented Apr 22, 2021

Even after gzip, node-casbin still need more than 400kb space, which is too large for the frontend.
If we did want to implement this, we should make a separate light-weight branch on node-casbin.

As a reference, react dom is 37.4kb, vue.js is 25.6kb. Webpack suggest frontend project bundle should be less than 256kb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants