2017 © Pedro Peláez
 

library cmauth

cmauth laravel 5.1.11 rbac

image

cemleme/cmauth

cmauth laravel 5.1.11 rbac

  • Thursday, December 3, 2015
  • by cemleme
  • Repository
  • 1 Watchers
  • 1 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

CMAUTH2

Cmauth2 is a Role Based Access Control Authentication package developed for Laravel 5.1.11 applications.br/ You can creating unlimited Groups (Roles) and Permissions and assign your users to Groups., (*1)

Afterwards you can use your filters and facades to check if the logged in user has proper permission for the current route / controller / method / view part., (*2)


Features:

  • Creating and managing Users, Groups (Roles) and Permissions
  • Managing login / logout / remember steps
  • Permissions checks with filters and facades
  • Option to choose different users to have passwords on the system or check credentials through LDAP
  • Cmauth admin panel to assign users and permissions to groups

Requirements:

  • Laravel 5
  • PHP ldap extension (if you require LDAP authentication)

Setup:

In the require key of composer.json file add the following, (*3)

"cemleme/cmauth2": "dev-master"

Run the Composer update comand, (*4)

$ composer update cemleme/cmauth

In your config/app.php add CmauthServiceProvider to the end of the providers array, (*5)

'providers' => [
    ...
    'Cemleme\Cmauth\CmauthServiceProvider',
],

Assign same User model at config/auth.php, (*6)

'model' => 'Cemleme\Cmauth\models\User'  //(or \App\User if you extend \Cemleme\Cmauth\models\User)

Publish config file config/cmauth.php using artisan publish command:, (*7)

php artisan vendor:publish --provider="Cemleme\Cmauth\CmauthServiceProvider"

Cmauth Config File:

  • 'mastertemplate' : The template you want to wrap Cmauth admin panel. It looks for @yield('content') at the template page
  • 'loginview' => Your desired login page. Cmauth is compatible with default Laravel 5 login page. You do not need any extra fields
  • 'ldap' => Optional. Set it to true if you want to use LDAP authentication
  • 'ldap_domain' => Required if 'ldap' => true. Your LDAP domain name
  • 'ldap_server' => Required if 'ldap' => true. IP address of your LDAP server
  • 'ldap_port' => Required if 'ldap' => true. Port of your LDAP server

Used Packages:

  • For log viewer, create "ViewLog" Permission and assign it to desired user. The route is /logs
  • For laravel backup, you can publish the config file using php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"

The Versions