-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Dependency issues in Angualr #177
Comments
@fahussain do you use the casbin.js@next? could you provide the model and policy? |
For my server side I use NestJS and yes casbin is working there. This is my model: [request_definition]
r = subject, tenant, object, action
[policy_definition]
p = subject, tenant, object, action
[role_definition]
g = _, _, _
g2 = _, _, _
[policy_effect]
e = some(where (p.eft == allow)) && !some(where (p.eft == deny))
[matchers]
m = g(r.subject, p.subject, r.tenant) && g2(r.object, p.object, r.tenant) && r.tenant == p.tenant && r.action == p.action I am not sure what you mean by casbin.js@next. I was hoping to use casbin.js on the frontdend in Angular to implement the policies. My policies are going to be dynamic and quite large, generated by an application in which admins can add Tenants, Roles, Users, Objects, Actions, Policies etc... On the server I am using TypeOrm adapter to store policies in MySQL. |
@fahussain plz refer to https://github.com/casbin/casbin.js/tree/v1 to get the infomation about |
In short, |
I have the same issue here. The |
Can't |
Workaround:
Nope, casbin.js@next version does not resolve this without that workaround. |
@giovanni-bertoncelli Could you provide a repository for reproduce this issue? |
Experiencing the same thing. Here's a repo: https://github.com/danverde/CasbinJS-React/tree/broken |
Thanks @danverde, I know how to resolve it. |
Because we are incorrect design, this version is confusing, we are decided to improve the but this version number is incorrect, should be |
@nodece So I need to use version |
Yes, you can install this by
We don't continue to release the casbin.js to instead of node-casbin. |
I was able to get |
Sorry, |
I tried using casbin.js in my Angular project but it seems casbin is dependent on some core node.js modules, path stream and fs to be more specific. Angular 12 uses webpack 5 which does not allow core node.js modules to be included in a web app. I tried some workarounds but finally gave up since I found out that casbin.js does not support RBAC with domains as mentioned here #31.
The text was updated successfully, but these errors were encountered: