eugenec138 / cakephp-roles-capabilities
Roles and Capabilities plugin for CakePHP
Installs: 7
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:cakephp-plugin
Requires
- eugenec138/cakephp-groups: ^1.0.3
- eugenec138/cakephp-utils: ^1.0.3
Requires (Dev)
- cakephp/cakephp-codesniffer: ^3.0
- phpunit/phpunit: ^5.0
This package is not auto-updated.
Last update: 2025-01-09 21:54:40 UTC
README
About
CakePHP 3+ plugin managing user roles and capabilities.
Developed by Qobo, used in Qobrix.
Installation
You can install this plugin into your CakePHP application using composer.
This plugin works along with Qobo Groups plugin.
The recommended way to install composer packages is:
composer require qobo/cakephp-roles-capabilities
Run plugin's migration task:
bin/cake migrations migrate -p RolesCapabilities
Run required plugin(s) migration task:
bin/cake migrations migrate -p Groups
Setup
Load plugin
bin/cake plugin load --routes --bootstrap RolesCapabilities
Load required plugin(s)
bin/cake plugin load Muffin/Trash
bin/cake plugin load --routes --bootstrap CakeDC/Users
Load the Capability component in your src/Controller/AppController.php file using the initialize()
method. Additionally use the CapabilityTrait in AppController. See details below:
use RolesCapabilities\CapabilityTrait;
class AppController extends Controller
{
use CapabilityTrait;
public function initialize()
{
parent::initialize();
$this->loadComponent('Flash');
$this->loadComponent('RolesCapabilities.Capability', [
'currentRequest' => $this->request->params
]);
}