-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add globMatch as a global built-in matcher function (#232)
* #231 add globMatch as a global built-in matcher function * feat: Add globMatch as a global built-in matcher function Signed-off-by: Leon Segal <leon.segal@hs-soft.com> Co-authored-by: Leon Segal <leon.segal@hs-soft.com>
- Loading branch information
Showing
5 changed files
with
95 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Net; | ||
using NetCasbin.Abstractions; | ||
|
||
namespace NetCasbin.Util.Function | ||
{ | ||
public class GlobMatchFunc : AbstractFunction | ||
{ | ||
protected override Delegate GetFunc() | ||
{ | ||
Func<string, string, bool> call = BuiltInFunctions.GlobMatch; | ||
return call; | ||
} | ||
|
||
public GlobMatchFunc() : base("globMatch") | ||
{ | ||
|
||
} | ||
} | ||
} |