Closed vansangnguyen1998 closed 2 months ago
@sagilio @sociometry @AsakusaRinne
@vansangnguyen1998 please:
@hsluoyz With my models.conf above. When use e.GetPolicy() I get response 2 record:
My expect have to exists 3 record 2 record 2 above and 1 record with v5 null same image above ticket.
This should be related to the SQL generated by the policy. I will try to reproduce it later.
@sagilio I have reproduce with NodeJS with the same case, same data, and same model, Surprisingly, I can get all policy with the same my expectation (3 policy). Please check again with CasbinNodeJS (Node Cas) and Casbin-Dotnet
please reproduce with dotnet ASAP help me. Thanks all
@vansangnguyen1998 if your problem is for one adapter, create issue in that adapter's repo, not here
it seems that adapter is not the problem, the question is cause by function ValuesFrom in model/policy.cs, it use string.IsNullOrWhiteSpace to valid weather the field is exist , so when the field is blank , it will return false when TryAddPolicy call ValidatePolicy, and it will not appears in the result
:tada: This issue has been resolved in version 2.6.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
I am implemented Authorization with casbin in my dotnet project. I use EF core adapter for casbin and sql server to database. My model.conf:
I have the fake policy in sql server similar like that:
When I call request to check permission for pipeline request:
But data when e.GetPolicy() only return 2 item with v5 is not null
Please help me solve problem with casbin.
I want to e.GetPolicy() have to have 3 policy contain record v5 is null