https://github.com/hiqdev/hipanel-rbac
RBAC implementation for HiPanel
https://github.com/hiqdev/hipanel-rbac
hacktoberfest
Last synced: 12 months ago
JSON representation
RBAC implementation for HiPanel
- Host: GitHub
- URL: https://github.com/hiqdev/hipanel-rbac
- Owner: hiqdev
- License: bsd-3-clause
- Created: 2016-04-08T15:45:21.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T10:21:43.000Z (over 1 year ago)
- Last Synced: 2024-11-10T18:45:40.319Z (over 1 year ago)
- Topics: hacktoberfest
- Language: PHP
- Size: 344 KB
- Stars: 6
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# HiPanel RBAC
**RBAC implementation for HiPanel**
[](https://packagist.org/packages/hiqdev/hipanel-rbac)
[](https://packagist.org/packages/hiqdev/hipanel-rbac)
[](https://travis-ci.org/hiqdev/hipanel-rbac)
[](https://scrutinizer-ci.com/g/hiqdev/hipanel-rbac/)
[](https://scrutinizer-ci.com/g/hiqdev/hipanel-rbac/)
[](https://hipanel.com/)
[HiPanel](http://hipanel.com/) 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](http://getcomposer.org/download/).
Either run
```sh
php composer.phar require "hiqdev/hipanel-rbac"
```
or add
```json
"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](LICENSE).
Read more [here](http://choosealicense.com/licenses/bsd-3-clause).
Copyright © 2016-2019, HiQDev (http://hiqdev.com/)