Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fix call to AddDomainMatchingFunc() #345

Merged

Conversation

zredinger-ccc
Copy link
Contributor

The extension function to add a domain matching func was calling the wrong role manager method. This resolves the issue. I also fixed a spelling error from Manger -> Manager across the repo

@casbin-bot
Copy link
Member

@sagilio please review

}

public static void AddNamedDomainMatchingFunc(this IEnforcer enforcer, string roleType,
Func<string, string, bool> func)
{
enforcer.Model.GetRoleManger(roleType).AddMatchingFunc(func);
enforcer.Model.GetRoleManager(roleType).AddDomainMatchingFunc(func);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the actual bug that was fixed

@hsluoyz hsluoyz changed the title fix: Fix call to AddDomainMatchingFunc() feat: fix call to AddDomainMatchingFunc() Mar 9, 2024
@hsluoyz hsluoyz merged commit 9379fba into casbin:master Mar 9, 2024
7 checks passed
Copy link

github-actions bot commented Mar 9, 2024

🎉 This PR is included in version 2.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@zredinger-ccc zredinger-ccc deleted the fix/adding-domain-matching-func branch March 9, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants