dotkernel/dot-controller-plugin-authorization

This package is abandoned and no longer maintained. No replacement package was suggested.

DotKernel authorization controller plugin

2.0.1 2022-05-17 09:04 UTC

This package is auto-updated.

Last update: 2022-06-17 09:45:35 UTC


README

Authorization controller plugin

OSS Lifecycle GitHub license

NOTE

dot-controller-plugin-authorization is archived and will receive no further development!

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);