hazicms / auth by aitiba

Basic authentication with CRUD for users,roles and permissions.
19
1
1
Package Data
Maintainer Username: aitiba
Maintainer Contact: freelance@aitoribanez.com (Aitor Ibañez)
Package Create Date: 2015-05-17
Package Last Update: 2015-05-27
Language: PHP
License: GPL-3.0
Last Refreshed: 2024-11-14 15:05:37
Package Statistics
Total Downloads: 19
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

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