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: Support for wildcard match #361

Closed
wants to merge 0 commits into from

Conversation

Shivansh-yadav13
Copy link
Member

  • Wildcard match can be used in the following for now

    • GetFilteredPolicy()
    • GetFilteredNamedPolicy()
    • GetFilteredGroupingPolicy()
    • GetFilteredNamedGroupingPolicy()
    • HasPolicy()
    • HasNamedPolicy()
    • HasGroupingPolicy()
    • HasNamedGroupingPolicy()
  • fix Support WildCard Match in getFilteredPolicy #358

@casbin-bot
Copy link
Member

@Gabriel-403 @Zxilly @kingiw @nodece please review

@hsluoyz
Copy link
Member

hsluoyz commented Apr 16, 2022

@tangyang9464

@nodece
Copy link
Member

nodece commented Apr 30, 2022

Is this synchronized with golang-casbin?

@Shivansh-yadav13
Copy link
Member Author

Is this synchronized with golang-casbin?

@nodece I don't think we have this feature in golang-casbin

@tangyang9464
Copy link
Member

@Shivansh-yadav13 @nodece This pr supports wildcard match, but maybe still not flexible enough. For example, users may need to use different pattern match methods for different fields of the policy. Can we use matcher directly to filter policies? like casbin#1009. But it only supports GetFilteredPolicy. GetFilteredGroupingPolicy may be supported by this PR, but I don't think it is necessary to support it. As for HasPolicy, I don't think it's necessary to use wildcard match also.

@Shivansh-yadav13
Copy link
Member Author

@tangyang9464 then I'm adding GetFilteredNamedPolicyWithMatcher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support WildCard Match in getFilteredPolicy
5 participants