hazicms/auth

Basic authentication with CRUD for users,roles and permissions.

dev-master 2015-05-27 14:18 UTC

This package is not auto-updated.

Last update: 2022-01-08 02:59:42 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

  1. Add this package to your composer.json:

     "require": {
         "hazicms/auth": "dev-master"
     }
    
  2. Run composer update

     composer update
    
  3. Add the ServiceProviders to the providers array in config/app.php.

     'HaziCms\Auth\AuthServiceProvider'
    
  4. Publish config files for generators, modules and images:

     php artisan vendor:publish --provider="HaziCms\Generator\Generator\GeneratorServiceProvider"
    
  5. Add those lines to app\Http\Kernel.php file:

     protected $routeMiddleware = [
         'hazicms.basic' => 'HaziCms\Http\Middleware\AuthBasicMiddleware',
     ];
    
  6. Add middleware to controller's __construct() method:

     $this->middleware('hazicms.basic');
    
  7. You are ready! :-)

Credits

This module is created by Aitor Ibañez.

Bugs & Forks are welcomed :)