Skip to content
DotKernel authorization controller plugin component
PHP
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
CHANGELOG.md
LICENSE.md
README.md
composer.json

README.md

dot-controller-plugin-authorization

Authorization controller plugin

Installation

Run the following command

$ composer require dotkernel/dot-controller-plugin-authorization

This will also install packages dotkernel/dot-controller and dotkernel/dot-authorization as dependencies. Next, enable the module by merging the ConfigProvider to your application's configuration.

Usage

In any controller, you can access this plugin by calling

$this->authorization()->...

This plugin defines one method, as a proxy to the registered authorization service

$this->authorization()->isGranted($permission, array $roles = [], $context = null);
You can’t perform that action at this time.