inok/rbac 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inok/rbac

最新稳定版本:3.0.2

Composer 安装命令:

composer require inok/rbac

包简介

PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.

README 文档

README

PHP-RBAC is an authorization library for PHP. It provides developers with NIST Level 2 Hierarchical Role Based Access Control and more, in the fastest implementation yet.

Current Stable Release: PHP-RBAC v3.0

Connect With Us

What is a Rbac System?

Take a look at the "Before You Begin" section of our Documentation to learn what an RBAC system is and what PHP-RBAC has to offer you and your project.

NIST Level 2 Compliance

For information regarding NIST RBAC Levels, please see This Paper.

For more great resources see the NIST RBAC Group Page.

Installation

You can now use Composer to install the PHP-RBAC code base.

For Installation Instructions please refer to the "Getting Started" section of our Documentation.

Usage

Instantiating a PHP-RBAC Object

With a 'use' statement:

        use Inok\RBAC\Rbac;
        
        $rbac = new Rbac($db, $tablePrefix);

, where

  • $db - PDO Object (supports MySQL, SQLite)
  • $tablePrefix - RBAC-tables prefix (default: phprbac_)

Tests

Xml-files for Unit Tests:

  • phpunit.mysql.xml - For MySQL (MariaDB)
  • phpunit.sqlite.xml - For SQLite

Fill correct data for database connection in needed phpunit xml file:

  • DB_DSN - Data source name
  • DB_USER - Database username
  • DB_PASSWD - Database password

Run:

    vendor/bin/phpunit -c xml_file_name

PHP-RBAC and PSR

PHP-RBAC's Public API is now fully PSR-4 compliant.

You can now:

  • Use Composer to install/update PHP-RBAC
  • Use any PSR-4 compliant autoloader with PHP-RBAC
  • Use the included autoloader to load PHP-RBAC

If you notice any conflicts with PSR compliance please Submit an Issue.

How You Can Help

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2024-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固