Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: casbin/lua-casbin

Tags

v1.45.0

Toggle v1.45.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: update PCRE dependency to lrexlib-pcre2 (#163)

* feat: upgrade to lrexlib-pcre2

- update rockspec dependency
- update rockspec template
- rex_pcre2

Fixes #156

* ci: install correct dependencies for PCRE2

v1.44.0

Toggle v1.44.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: some adjustments to builtin functions (#162)

* test: added cases for builtin functions errors

* style: conformed to casbin/casbin

- moved wrappers under respective functions
- moved keyMatch5

* fix: globMatch FunctionMap

v1.43.0

Toggle v1.43.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: add support for keymatch5 function (#159)

* feat: add KeyMatch5 matcher

Fixes #153

* test: add test for KeyMatch5

v1.42.0

Toggle v1.42.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: switch to "luajit-openresty" to fix CI error (#161)

* ci: update leafo/gh-actions-lua to v10.0.0

* ci: change luaVersion for LuaJIT to luajit-openresty

Fixes: #160

v1.41.9

Toggle v1.41.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix: split function accounting for quotes (#158)

* fix #157: split function accounting for quotes

Added Util.splitCSVLine() function that splits a CSV-formatted string into an array of tokens, accounting for quotes (single and double) and escape characters.

* fix CI warning

Warning: "src/util/Util.lua:263:24: (W311) value assigned to variable sep is unused"

* update split function

- renamed from splitCSVLine to splitEnhanced, since it's not compliant to RFC 4180 and it could be  deceiving;
- added optional parameters;
- now throws error if quotes are not closed;

* update Util.splitEnhanced()

- fixed its behaviour to comply with Casbin documentation (see the note at https://casbin.org/docs/policy-storage#loading-policy-from-a-csv-file and issue 886 at casbin/casbin):
  "If your file contains commas and double quotes, you should enclose the field in double quotes and double any embedded double quotes."

Therefore I removed the extra behaviour related to single quotes ' and escape character \ and refactored the function.

* added example with double quotes

* Unit test for Util.splitEnhanced()

* fixed basic with regex example

* Update basic_policy_with_regex.csv

typo

* Unit test for regexMatch with {N,M} quantifier

* more unit tests for Util.splitEnhanced

- check if the last field is a quoted field
- throwing error when there are extra characters after the double quote that closes the quoted field.

* Update Util.lua

- support for quotes in last field;
- throws an exception if there are other characters after the double quote that closes the quoted field.

* changed "sep" parameter name to "delim"

(uniform to Util.split() )

* changed "line" parameter name to "str"

(uniform to Util.split() )

v1.41.8

Toggle v1.41.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: fix broken links (#151)

* fix: fix broken links

* Update README.md

---------

Co-authored-by: hsluoyz <[email protected]>

v1.41.7

Toggle v1.41.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: Revert 146 fix protocol and fix rockspec (#147)

* Revert "fix: rockspec url protocol (#146)"

This reverts commit e9ebbac.

* fix: rockspec source url

v1.41.6

Toggle v1.41.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: rockspec url protocol (#146)

v1.41.5

Toggle v1.41.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: upgrade luarocks release template, fix missing parts in PR: #143 (

…#144)

v1.41.4

Toggle v1.41.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: fix `luaposix` build error (#143)