casbin / Casbin.NET

An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
https://casbin.org
Apache License 2.0
1.13k stars 110 forks source link

.NET library does not support multi-line mode with '\' line feeds #321

Closed Tanyuu closed 1 year ago

Tanyuu commented 1 year ago

Hello. When I am constructing test cases, .NET library does not seem to support multi-line mode with '\' line feeds. This is illustrated by a simple modification to basic_model.conf:

[request_definition]
r = sub, obj, act

[policy_definition]
p = sub, obj, act

[policy_effect]
e = some(where (p.eft == allow))

[matchers]
m = r.sub == p.sub &&\
r.obj == p.obj && r.act == p.act

And after running the test, the following error is reported: DynamicExpresso.Exceptions.ParseException : Syntax error '\' (at index 23).

I think I will improve this feature in the near future.

casbin-bot commented 1 year ago

@sagilio @sociometry @AsakusaRinne