hiqdev / hipanel-rbac
RBAC implementation for HiPanel
Installs: 28 777
Dependents: 2
Suggesters: 0
Security: 0
Stars: 6
Watchers: 5
Forks: 5
Type:yii2-extension
Requires
- hiqdev/yii-compat: dev-master
Requires (Dev)
- hiqdev/hidev: dev-master
- hiqdev/hidev-hiqdev: dev-master
- hiqdev/hidev-php: dev-master
- laminas/laminas-code: ^3.4.1
- nikic/php-parser: ^4.12
- phpunit/phpunit: ^7.5
- yiisoft/yii2: *@dev
This package is auto-updated.
Last update: 2024-12-10 13:58:04 UTC
README
RBAC implementation for HiPanel
HiPanel is the next generation control panel for hosting, domains and more.
This package provides RBAC implementation for HiPanel:
- authorization data: roles and permissions
- helpers
Installation
The preferred way to install this yii2-extension is through composer.
Either run
php composer.phar require "hiqdev/hipanel-rbac"
or add
"hiqdev/hipanel-rbac": "*"
to the require section of your composer.json.
Usage
To add a role or permission you need to write it to src/files/tree.php
.
After adding roles you have to generate description to it by command:
./vendor/bin/hidev rbac/reinit
After these actions all rules are saved, and you need to check it by unit tests.
Run ./vendor/bin/phpunit
and correct CheckAccessTrait
to fix errors.
TypeScript tree file
js/index.ts
file will be generated with all rbac console commands (reinit, init, generate-descriptions
).
Also you can generate it with generate-js
command.
License
This project is released under the terms of the BSD-3-Clause license. Read more here.
Copyright © 2016-2019, HiQDev (http://hiqdev.com/)