Closed hxndg closed 10 months ago
@hxndg try your model in editor first: https://editor.casbin.org/
@hxndg try your model in editor first: https://editor.casbin.org/
model file is same with editor "abac with policy" default model, I just paste it from editor. Is there any way to show casbin-rs enforcer process ? enable_log function not find
[request_definition] r = sub, obj, act
[policy_definition] p = sub_rule, obj, act
[policy_effect] e = some(where (p.eft == allow))
[matchers] m = eval(p.sub_rule) && r.obj == p.obj && r.act == p.act
@hxndg try to run this ABAC 1 test case, it runs well at my side:
@hxndg try to run this ABAC 1 test case, it runs well at my side:
Thanks for your reply, I change the code to import a default policy file, all things seems alright then. I guess should not use below code to start a new enforcer without any policy/adapter added.
Enforcer::new(model_path, ()).await
I write a simle code to test abac usage, but it keep telling me somethin of "failed to user enforcer enforce Casbin Evaluation Error:
ErrorMismatchDataType("bool", "()", 1:1)
" I add the enable_log to trace debug, but rust compiler tell me this function does not exist, so how should i debug it ?