Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .github/luarocks-template.rockspec
Original file line number Diff line number Diff line change
@@ -1,25 +1,34 @@
package = "casbin"
version = "1.47.0-1"
source = {
url = "git+https://github.com/apache/casbin-lua-casbin.git",
url = "https://downloads.apache.org/incubator/casbin/lua/1.47.0/apache-casbin-lua-1.47.0-incubating-src.tar.gz",
dir = "apache-casbin-lua-1.47.0-incubating-src",
}
description = {
summary = "An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)",
summary = "Apache Casbin for Lua (incubating): ACL, RBAC and ABAC authorization",
detailed = [[
An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)
Apache Casbin is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is required
of all newly accepted projects until a further review indicates that the
infrastructure, communications, and decision making process have stabilized
in a manner consistent with other successful ASF projects. While incubation
status is not necessarily a reflection of the completeness or stability of
the code, it does indicate that the project has yet to be fully endorsed by
the ASF.
]],
detailed = "An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)",
homepage = "https://github.com/apache/casbin-lua-casbin",
license = "Apache License 2.0",
maintainer = "admin@casbin.org"
maintainer = "Apache Casbin <dev@casbin.apache.org>"
}
dependencies = {
"lua >= 5.1",
"lua >= 5.1, < 5.5",
"lualogging >= 1.5.1",
"lrexlib-pcre2 >= 2.9.2",
"luaposix = 35.1-1"
}
build = {
type = "builtin",
copy_directories = {"doc"},
modules = {
["casbin"] = "casbin.lua",
["src.config.Config"] = "src/config/Config.lua",
Expand All @@ -35,6 +44,9 @@ build = {
["src.model.Model"] = "src/model/Model.lua",
["src.model.Policy"] = "src/model/Policy.lua",
["src.model.FunctionMap"] = "src/model/FunctionMap.lua",
["src.persist.cache.Cache"] = "src/persist/cache/Cache.lua",
["src.persist.cache.DefaultCache"] = "src/persist/cache/DefaultCache.lua",
["src.persist.UpdateAdapter"] = "src/persist/UpdateAdapter.lua",
["src.persist.Adapter"] = "src/persist/Adapter.lua",
["src.persist.BatchAdapter"] = "src/persist/BatchAdapter.lua",
["src.persist.FilteredAdapter"] = "src/persist/FilteredAdapter.lua",
Expand All @@ -54,4 +66,4 @@ build = {
["src.util.Log"] = "src/util/Log.lua",
["modules.luaxp"] = "modules/luaxp.lua"
}
}
}
8 changes: 8 additions & 0 deletions DISCLAIMER
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Apache Casbin is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is required
of all newly accepted projects until a further review indicates that the
infrastructure, communications, and decision making process have stabilized
in a manner consistent with other successful ASF projects. While incubation
status is not necessarily a reflection of the completeness or stability of
the code, it does indicate that the project has yet to be fully endorsed by
the ASF.
18 changes: 18 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,21 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


Third-party material included in this distribution
===================================================

modules/luaxp.lua is LuaXP 1.0.1 by Patrick Rigney, distributed under the
MIT license reproduced below. Its original header is retained.
Upstream: https://github.com/toggledbits/luaxp

MIT LICENSE (LUAXP)

LuaXP Copyright 2016,2018 Patrick H. Rigney

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8 changes: 8 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Apache Casbin for Lua
Copyright 2026 The Apache Software Foundation

This product includes software developed at
The Apache Software Foundation (https://www.apache.org/).
This product includes software originally developed by the Casbin Authors.

Portions of this software are copyright 2021 The casbin Authors.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# lua-casbin
# Apache Casbin for Lua (incubating)
[![GitHub Action](https://github.com/apache/casbin-lua-casbin/workflows/build/badge.svg?branch=master)](https://github.com/apache/casbin-lua-casbin/actions)
[![Coverage Status](https://coveralls.io/repos/github/apache/casbin-lua-casbin/badge.svg?branch=master)](https://coveralls.io/github/apache/casbin-lua-casbin?branch=master)
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
Expand Down Expand Up @@ -31,12 +31,30 @@ production-ready | production-ready | production-ready | production-ready
[PyCasbin](https://github.com/casbin/pycasbin) | [Casbin.NET](https://github.com/casbin-net/Casbin.NET) | [Casbin-CPP](https://github.com/casbin/casbin-cpp) | [Casbin-RS](https://github.com/casbin/casbin-rs)
production-ready | production-ready | beta-test | production-ready

## Incubation status

Apache Casbin is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is required
of all newly accepted projects until a further review indicates that the
infrastructure, communications, and decision making process have stabilized
in a manner consistent with other successful ASF projects. While incubation
status is not necessarily a reflection of the completeness or stability of
the code, it does indicate that the project has yet to be fully endorsed by
the ASF.

## Installation

```bash
sudo luarocks install casbin
```

The LuaRocks package remains `casbin`, and the Lua import remains
`require("casbin")`. Releases through 1.46.0 predate Apache incubation.

Lua 5.1 through 5.4 and LuaJIT are supported. The pinned luaposix dependency
requires Lua < 5.5; the source syntax fixes alone do not establish Lua 5.5
installation support.

## Get Started

1. New Casbin enforcer with a model file and a policy file:
Expand Down
8 changes: 8 additions & 0 deletions doc/DISCLAIMER
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Apache Casbin is an effort undergoing incubation at The Apache Software
Foundation (ASF), sponsored by the Apache Incubator. Incubation is required
of all newly accepted projects until a further review indicates that the
infrastructure, communications, and decision making process have stabilized
in a manner consistent with other successful ASF projects. While incubation
status is not necessarily a reflection of the completeness or stability of
the code, it does indicate that the project has yet to be fully endorsed by
the ASF.
Loading
Loading