hazicms / auth
Basic authentication with CRUD for users,roles and permissions.
dev-master
2015-05-27 14:18 UTC
Requires
- php: >=5.4.0
- bican/roles: 1.6.*
This package is not auto-updated.
Last update: 2024-11-09 18:16:57 UTC
README
AuthBasicMiddleware has the next permissions:
- All user with role 'admin', has all permissions.
- index action: none permission.appear only our resources. all if in 'admin' role.
- create action: need to be 'create.MODEL' permission.
- edit action: need to be 'edit.MODEL' permission and be creator of this resource.
- delete action: need to be 'delete.MODEL' permission and be creator of this resource.
Steps to Get Started
-
Add this package to your composer.json:
"require": { "hazicms/auth": "dev-master" }
-
Run composer update
composer update
-
Add the ServiceProviders to the providers array in
config/app.php
.'HaziCms\Auth\AuthServiceProvider'
-
Publish config files for generators, modules and images:
php artisan vendor:publish --provider="HaziCms\Generator\Generator\GeneratorServiceProvider"
-
Add those lines to
app\Http\Kernel.php
file:protected $routeMiddleware = [ 'hazicms.basic' => 'HaziCms\Http\Middleware\AuthBasicMiddleware', ];
-
Add middleware to controller's __construct() method:
$this->middleware('hazicms.basic');
-
You are ready! :-)
Credits
This module is created by Aitor Ibañez.
Bugs & Forks are welcomed :)