This file contains hidden or 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
// KeyMatch4 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *. | |
// Besides what KeyMatch3 does, KeyMatch4 can also match repeated patterns: | |
// "/parent/123/child/123" matches "/parent/{id}/child/{id}" | |
// "/parent/123/child/456" does not match "/parent/{id}/child/{id}" | |
// But KeyMatch3 will match both. | |
func KeyMatch4(key1 string, key2 string) bool { | |
key2 = strings.Replace(key2, "/*", "/.*", -1) | |
tokenMap := map[string]int{} | |
j := -1 |
This file contains hidden or 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
Tomás Arias @KNawm Apr 08 2020 22:27 | |
Hi Yang, I submitted a proposal for porting Casbin for Dart, do you happen to know if someone other than me had some interest in the project? | |
Tomás Arias @KNawm Apr 08 2020 22:35 | |
It is a very interesting project and regardless if I'm selected or not I would love to work on the project in my free time, if there's some interest I think a org-wide repo would be better for that so other people can contribute more easily | |
What do you think? | |
Yang Luo @hsluoyz Apr 08 2020 22:37 | |
Hi Tomas, you can ask in Casbin's dev and gsoc channel for Dart interest | |
What progress has you got? | |
I personally think if you have working ACL and RBAC at least, I can create such a repo under casbin org | |
Tomás Arias @KNawm Apr 08 2020 22:47 |