Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/boleiros/guardian

Access Control List(ACL) for CakePHP3.x (beta)
https://github.com/boleiros/guardian

acl cakephp cakephp-plugin cakephp3 php

Last synced: about 1 month ago
JSON representation

Access Control List(ACL) for CakePHP3.x (beta)

Awesome Lists containing this project

README

        

# Guardian plugin for CakePHP ACL

## Installation

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require boleiros/guardian
```

## Enable Plugin

```php
// config/bootstrap.php

Plugin::load('Guardian', ['bootstrap' => true, 'routes' => true]);
```
Or, in your terminal:

```
bin/cake plugin load -b -r Gardian
```

## Run Migrations

```
bin/cake migrations migrate --plugin Guardian
```

## Usage

1. import and use the Guardian Trait on your user Model
```
//User.php
hasPermission('users.index') ```