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.16k stars 111 forks source link

feat: fix different ways of building role links when domain patterns are enabled #352

Closed imf-code closed 5 months ago

imf-code commented 5 months ago

Attempt at addressing #351

Effectively causes each role in each domain to be considered their own role. That is:

g, role1, base-role, dom/*
g, alice, role1, dom/1

Should result in following link chain: alice in dom/1 -> role1 in dom/1 -> role1 in dom/ -> base-role in dom/ This could lead to maximum hierarchy being reached faster then expected in some cases.

Performance and concurrency has been considered but not really tested.

Fix: https://github.com/casbin/Casbin.NET/issues/351

casbin-bot commented 5 months ago

@sagilio please review

CLAassistant commented 5 months ago

CLA assistant check
All committers have signed the CLA.

hsluoyz commented 5 months ago

@imf-code plz fix CI errors:

image

github-actions[bot] commented 5 months ago

:tada: This PR is included in version 2.7.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: