node-casbin
node-casbin copied to clipboard
feat: Support for wildcard match
-
Wildcard match can be used in the following for now
- GetFilteredPolicy()
- GetFilteredNamedPolicy()
- GetFilteredGroupingPolicy()
- GetFilteredNamedGroupingPolicy()
- HasPolicy()
- HasNamedPolicy()
- HasGroupingPolicy()
- HasNamedGroupingPolicy()
-
fix #358
@Gabriel-403 @Zxilly @kingiw @nodece please review
@tangyang9464
Is this synchronized with golang-casbin?
Is this synchronized with golang-casbin?
@nodece I don't think we have this feature in golang-casbin
@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.
@tangyang9464 then I'm adding GetFilteredNamedPolicyWithMatcher