跳转到主要内容

参与贡献

Casbin 是一个开源的授权库,有多种语言的实现。我们欢迎任何受支持语言的贡献者参与。

项目主要分为两个方向:

  • 核心与各语言移植版 —— 在 Go、Java、Node.js、PHP、Python、.NET、C++、Rust 等语言中实现 Casbin 的核心与生态系统。
golangjavanodejsphp
CasbinjCasbinnode-CasbinPHP-Casbin
生产可用生产可用生产可用生产可用
pythondotnetc++rust
PyCasbinCasbin.NETCasbin-CPPCasbin-RS
生产可用生产可用生产可用生产可用
  • 应用与工具 —— 基于 Casbin 构建的项目(例如编辑器、仪表盘)。
项目演示详情技术栈
Casbin EditorCasbin Editor一个基于浏览器的编辑器,用于创建和测试 Casbin 的 model 和 policy。TypeScript + React

贡献方式​

  • 使用 Casbin 并提供反馈 —— 在 GitHub 上报告 bug 或提出功能建议。对于较大的想法,请先在 Discord 或 GitHub Discussions 上讨论。提交 issue 和参与讨论时请使用英文。

  • 改进文档 —— 文档是很好的切入点;欢迎随时修正错误或澄清表述。

  • 认领 issue —— 请查看项目看板上尚未关闭的 issue;其中许多都标注了难度。

提交 pull request​

我们使用 GitHub 和标准的 pull request 流程。

提交之前:

  • 请清楚地说明你修改的目的和影响。

  • 让每个 PR 保持聚焦(只做一件事:一个功能或一个修复)。把不相关的改动拆分为不同的 PR。

  • 添加新文件时,请在顶部包含 Casbin 许可证声明:

    // Copyright 2021 The casbin Authors. All Rights Reserved.
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // 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.
  • 请使用符合语义化规范的提交信息,格式为:<type>(<scope>): <subject>。其中 <scope> 是可选的。详细规范请参阅 Conventional Commits。

许可证​

对 Casbin 的所有贡献都采用 Apache 许可证授权。