question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Casbin .NET doesn't support multiple evals

See original GitHub issue

I have tried many times, and i can surely say that if i use a policy like this:

[request_definition]
r = sub, obj, act

[policy_definition]
p = rule_sub, rule_obj, rule_act

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

[matchers]
m = eval(p.rule_sub) && eval(p.rule_obj) && eval(p.rule_act)

No matter what, casbin considers only the first eval. Can you fix this please? I already read about this problem, maybe it was not fixed for .net?

I have 1.4.0 version downloaded from nuget. Thanks in advance.

@hsluoyz

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sagiliocommented, Jun 3, 2021

@mentapro This bug should have been fixed. Can you provide a test case with a sample model and policy files?

0reactions
github-actions[bot]commented, Jun 7, 2021

🎉 This issue has been resolved in version 1.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax for Models
The matcher evaluation in Casbin is implemented by expression evaluators in each language. Casbin integrates their powers to provide the unified PERM language....
Read more >
Overview
Casbin is a powerful and efficient open-source access control library that supports various access control models for enforcing authorization across the ...
Read more >
Multiple casbin policy definitions in model fail when ...
I'm testing out a very simple permissions model, but seems like two policy_definition values in a model can not be handled in NodeJS?...
Read more >
Understanding Casbin with different Access Control Model ...
Casbin currently has its support for Golang, Java, C/C++, Node.js, Javascript, PHP, Laravel, Python, .NET (C#), Delphi, Rust, Ruby, ...
Read more >
Casbin.NET 1.5.0
Casbin.NET is a powerful and efficient open-source access control library for .NET (C#) projects. It provides support for enforcing ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found