hazicms/auth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hazicms/auth

Composer 安装命令:

composer require hazicms/auth

包简介

Basic authentication with CRUD for users,roles and permissions.

README 文档

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

统计信息

  • 总下载量: 19
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-05-17