feat: fix RBAC role inheritance with domains - #29
Conversation
|
|
Changed role inheritance storage from concatenated strings to tuples, enabling proper role hierarchy within domain contexts. Now supports multi-level role chains (e.g., admin → member → viewer) in domains. Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Added test that reproduces the exact scenario from the issue: admin → member → viewer role chain with domain "org:abc" Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
|
@sushilbansal plz review |
|
@copilot for test cases, should strictly refer to Golang Casbin: https://github.com/casbin/casbin/blob/master/rbac_api_with_domains_test.go |
Added test data file and test case matching rbac_api_with_domains_test.go from Golang Casbin, demonstrating role:global_admin inheriting from role:reader and role:writer in domain1. Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Added test matching Golang Casbin's rbac_api_with_domains_test.go. Created test data file Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot the test case should be exactly similar with the Golang Casbin's test case. No more and no less (no extra test case which is not included in Golang). Don't add something like "matching Golang Casbin tests", don't need to mention it. |
Removed rbac_domain_role_inheritance_test.exs and associated test data as they are not present in Golang Casbin. Core fix in role_group.ex and enforcer.ex remains, validated by existing test suite. Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>
Removed custom test file and test data. Core fix remains in role_group.ex and enforcer.ex, validated by existing test suite (394 tests pass). (commit cdbf033) Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
# [1.2.0](v1.1.0...v1.2.0) (2025-10-30) ### Features * fix RBAC role inheritance with domains ([#29](#29)) ([20c7b2b](20c7b2b))
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Fix: #28