-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support for different definitions? #2
Comments
Maybe you could implement is as another example... What do you think? |
I need to build this for a solution that will be open sourced. So while i can do that as an example, I would prefer to know if a different definition is supported so i can get to work. If not, i will likely need to approach this differently. |
Seems like that response was duplicated? |
What do you exaclty mean by "different definition is supported"? You are supposed to be able to use all the definitions supported by Casbin. If you know Casbin supports the definition you are looking for, then it should work here also. If it doesn't we can fix it to do so. |
Acknowledged. Thanks alot for the update. I will test the definition provided by casbin, and will let you know if i have any challenges. |
Nice! I'm waiting for your updates. PS - My Internet was a mess here, so my last messages were duplicated and misformatted... fixed them now.....ehehehheehhe. |
This will not work with definition below. Reason is the code is hardcoded to if(enforcer.enforce(username, path, method)) {
|
Also, it seems it ignore 'g', is that correct? I need roles for my multi tenant approach req.originalUrl.match(new RegExp(ignoredPathsRegex, "g")) |
"g" is for "Global match" in the regex... so it would look for all the occurrences of the |
@judahb can you provide an example showing "values" of your request? I mean, showing URLs and roles involved in a request and how would they should be handled? |
@tiagostutz I think @judahb means that the enforcement code is written as: if(enforcer.enforce(username, path, method)) { But the request part in the model is: [request_definition]
r = sub, dom, obj, act The const domain = "domain1";
if(enforcer.enforce(username, domain, path, method)) { Is there any way to support the domain arg easily in this repo? |
Can i modify the definition in the express example to support a modified RBAC with domains/tenants? Meaning is a custom definition supported?
The text was updated successfully, but these errors were encountered: