Skip to content

feat: keyMatch2 implementation - #11

Merged
hsluoyz merged 5 commits into
apache:masterfrom
Zat42:keyMatch2-implementation
Mar 18, 2022
Merged

feat: keyMatch2 implementation#11
hsluoyz merged 5 commits into
apache:masterfrom
Zat42:keyMatch2-implementation

Conversation

@Zat42

@Zat42 Zat42 commented Mar 16, 2022

Copy link
Copy Markdown
Contributor
  • Added key_match_2/2 to handle keyMatch2 matcher function
  • Renamed regex_match? to regexMatch to match Casbin naming
  • Tests for keyMatch2

@casbin-bot

Copy link
Copy Markdown

@ngoclinhng please review

@casbin-bot
casbin-bot requested a review from ngoclinhng March 16, 2022 14:59

@ngoclinhng ngoclinhng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add more tests for key_match_2 ( similar to this ). And also update the docs because it’s currently quite vague: what does it mean for key1 to match the pattern of key2 ? ( regex_match is straightforward since it’s a regular expression match). Btw, how about renaming key_match_2 to just key_match2? ? ( it’s a nice convention in Elixir for Boolean functions to have a question mark at the end).

@Zat42

Zat42 commented Mar 18, 2022

Copy link
Copy Markdown
Contributor Author

@ngoclinhng

  • key_match_2/2 -> key_match2?/2
  • Added more tests
  • Documentation updated

Honestly I thought the documentation was enough since this is just pattern matching and pretty straight forward 🤔

@hsluoyz
hsluoyz merged commit c68edd2 into apache:master Mar 18, 2022
github-actions Bot pushed a commit that referenced this pull request Oct 12, 2025
# 1.0.0 (2025-10-12)

### Bug Fixes

* add map support to request struct ([#8](#8)) ([5b0e701](5b0e701))
* add_policy at enforcer server hasn't handled a case where new_enforce comes. ([#6](#6)) ([a7478b8](a7478b8))
* enforcer_server ([#21](#21)) ([85efaa4](85efaa4))
* g3 matcher function + tests ([#13](#13)) ([d26a73c](d26a73c))

### Features

* add CI/CD automation with GitHub Actions and semantic-release ([#26](#26)) ([f775b8f](f775b8f))
* add EnforcerServer.reset_configuration/1 method ([#15](#15)) ([0e530da](0e530da))
* added persist adapters and ability to alter policies and mappings ([#19](#19)) ([d55e97a](d55e97a))
* keyMatch2 implementation ([#11](#11)) ([c68edd2](c68edd2))
* RBAC domain model ([#10](#10)) ([daafa79](daafa79))
* upgrade required elixir version to 1.13 ([#17](#17)) ([e828e3f](e828e3f))

### BREAKING CHANGES

* Drop support for elixir < 1.13

* chore: mix format

* chore: Add .tool-versions
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants