2017 © Pedro Peláez
 

library laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

image

sztyup/laravel-acl

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  • Tuesday, July 25, 2017
  • by sztyup
  • Repository
  • 1 Watchers
  • 0 Stars
  • 342 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 175 Forks
  • 0 Open issues
  • 21 Versions
  • 0 % Grown

The README.md

Kodeine/Laravel-ACL

Laravel Source Build Status License Total Downloads, (*1)

Laravel ACL adds role based permissions to built in Auth System of Laravel 5. ACL middleware protects routes and even crud controller methods., (*2)

Table of Contents

Requirements

  • This package requires PHP 5.4+

Getting Started

  1. Require the package in your composer.json and update your dependency with composer update:
"require": {
...
"kodeine/laravel-acl": "~1.0@dev",
...
},
  1. Add the package to your application service providers in config/app.php.
'providers' => [

Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
Illuminate\Auth\AuthServiceProvider::class,
...
Kodeine\Acl\AclServiceProvider::class,

],
  1. Publish the package migrations to your application and run these with `php artisan migrate.
$ php artisan vendor:publish --provider="Kodeine\Acl\AclServiceProvider"

Use your own models. Once you publish, it publishes the configuration file where you can define your own models which should extend to Acl models., (*3)

  1. Add the middleware to your app/Http/Kernel.php.
protected $routeMiddleware = [

....
'acl' => Kodeine\Acl\Middleware\HasPermission::class,

];
  1. Add the HasRole trait to your User model.
use Kodeine\Acl\Traits\HasRole;

class User extends Model implements AuthenticatableContract, CanResetPasswordContract
{
    use Authenticatable, CanResetPassword, HasRole;
}

Documentation

Follow along the Wiki to find out more., (*4)

Roadmap

Here's the TODO list for the next release (2.0)., (*5)

  • [ ] Refactoring the source code.
  • [ ] Correct all issues.
  • [ ] Adding cache to final user permissions.
  • [ ] Adding tests.

Change Logs

** March 13, 2017 * [x] Updated for Laravel 5.4. * [x] Migrations run locally instead of being published. * [x] Config option to specify database table prefix added. * [x] Config option to detail non-standard users table name added. * [x] can() renamed to hasPermission(). * [x] is() renamed to isRole()., (*6)

June 14, 2015 (latest) * [x] Added backward compatibility to l5.0 for lists() method. * [x] Added Blade Template Extensions., (*7)

March 28, 2015 * [x] Added Role Scope to get all users having a specific role. e.g User::role('admin')->get(); will list all users having admin role., (*8)

March 7, 2015 * [x] is() and can() methods now support comma for AND and pipe as OR operator. Or pass an operator as a second param. more information * [x] You can bind multiple permissions together so they inherit ones permission. more information, (*9)

Contribution Guidelines

Support follows PSR-2 PHP coding standards, and semantic versioning., (*10)

Please report any issue you find in the issues page. Pull requests are welcome., (*11)

The Versions

25/07 2017

1.1.7.x-dev

1.1.7.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

25/07 2017

1.1.7

1.1.7.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.6.x-dev

1.1.6.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.6

1.1.6.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.5.x-dev

1.1.5.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.5

1.1.5.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.4.x-dev

1.1.4.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

04/07 2017

1.1.4

1.1.4.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

25/06 2017

1.1.3.x-dev

1.1.3.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

25/06 2017

1.1.3

1.1.3.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

14/06 2017

1.1.2.x-dev

1.1.2.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

14/06 2017

1.1.2

1.1.2.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

13/06 2017

1.0.x-dev

1.0.9999999.9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

13/06 2017

1.1

1.1.0.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

13/06 2017

1.1.1

1.1.1.0

Light-weight role-based permissions for Laravel 5 built in Auth system. (forked by sztyup)

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar sztyup

laravel acl auth roles permissions eloquent security

12/06 2017

dev-master

9999999-dev

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel acl auth roles permissions eloquent security

12/06 2017

1.0

1.0.0.0

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel acl auth roles permissions eloquent security

17/03 2015

v0.1.3

0.1.3.0

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

laravel acl auth roles permissions eloquent security kodeine

12/03 2015

v0.1.2

0.1.2.0

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

laravel acl auth roles permissions eloquent security kodeine

10/03 2015

v0.1.1

0.1.1.0

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

laravel acl auth roles permissions eloquent security kodeine

24/02 2015

v0.1.0

0.1.0.0

Light-weight role-based permissions for Laravel 5 built in Auth system.

  Sources   Download

MIT

The Requires

 

laravel acl auth roles permissions eloquent security kodeine