question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support WildCard Match in getFilteredPolicy

See original GitHub issue

Example : I have subject admin:create:any , admin:create:own, i need wildcard to get matched subject and then check value is any or own to handle my business logic

getFilteredPolicy(0, 'admin:create:*', 'user', 'create')

I think the getFilteredPolicy() support something like

 if (fieldValue !== '' && rule[fieldIndex + i] !== fieldValue && !picomatch.isMatch(rule[fieldIndex + i], fieldValue)) {
          matched = false;
          break;
 }

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Shivansh-yadav13commented, Apr 16, 2022

@kerituni12 please review #361

1reaction
Shivansh-yadav13commented, Apr 14, 2022

@hsluoyz maybe we can create a method so that wildcard support can be added for all such types of methods. should we focus on adding something like that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

wildcard-match - npm
A tiny and extremely fast library for compiling and matching basic glob patterns. Latest version: 5.1.2, last published: 2 years ago.
Read more >
Win32 API to do wildcard string match - c++ - Stack Overflow
The API that FindFirstFile uses internally for wildcard matches is probably FsRtlIsNameInExpression. DbgHelp may be part of the operating system.
Read more >
Filter wildcard support - IBM
The wildcard character (%) enables the collector to match strings without you having to provide all possible string values for a filter value....
Read more >
Wildcard Pattern Matching - GeeksforGeeks
character matches with one or more characters in Text. ... If they do not match, wildcard pattern and Text do not match.
Read more >
wildcard - Go Packages
supports '*' and '?' wildcards in the pattern string. unlike path.Match(), considers a path as a flat name space while matching the pattern....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found