2017 © Pedro Peláez
 

library laravel-yes-authority

YesAuthority - Laravel Routes Authorization Library

image

livelyworks/laravel-yes-authority

YesAuthority - Laravel Routes Authorization Library

  • Wednesday, June 27, 2018
  • by vinodraut
  • Repository
  • 3 Watchers
  • 6 Stars
  • 249 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 33 Versions
  • 53 % Grown

The README.md

# YesAuthority

YesAuthority is flexible authorization system for Laravel, It checks the route permission to access a certain portion of the site or application. To add Permissions User-based, Role-based, Conditionally. It uses authority.checkpost middleware for filter permission of current accessing route, Under this middleware checked every permission of the user login., (*1)

Installation

Require this package in your composer.json or install it by running:, (*2)

    composer require livelyworks/laravel-yes-authority

Now, insert this line into your config/app.php under the provider array., (*3)

    LivelyWorks\YesAuthority\YesAuthorityServiceProvider::class

Now, run this command after that config/yes-authority.php and app/Http/Middleware/YesAuthorityCheckpostMiddleware.php files are publish., (*4)

    php artisan vendor:publish  --tag="yesauthority"

Now, insert this line into your app/Http/Kernel.php under the $routeMiddleware array., (*5)

    'authority.checkpost'  => \App\Http\Middleware\YesAuthorityCheckpostMiddleware::class

Use authority.checkpost middleware for handle permission base routes., (*6)

    Route::group(['middleware' => 'authority.checkpost'], function () {
        // Place all those routes here which needs authentication and authorization.
    });

Now, the basic setup is ready you need to configure rules of permissions using config/yes-authority., (*7)

Configuration

The structure of permissions given below, but it's highly recommended to read more on docs`., (*8)


[ 'allow' => ['*'], // Allowed permission to user. Priority is less than deny. 'deny' => ['temp1'], // Deny permission to user. Priority is higher than allow. ] canAccess('temp1'); // false

Usage - Helpers


canAccess($accessId = null);

** Check the access, By default it check current route and return response in boolean value., (*9)

    canAccess('temp1');
    // true or false

canPublicAccess($accessId = null); - `Authentication not required`

** Check the public access, By default it check current route and return response in boolean value., (*10)

    canPublicAccess();
    // true or false

Usage - Facade


YesAuthority::check($accessId = null, $requestForUserId = null)

** Check the access of $accessId, By default it check current route and return response in boolean value, And it can check access of perticular user by passing user id ($requestForUserId) parameter., (*11)

    YesAuthority::check('temp1');
    // true or false

YesAuthority::isPublicAccess($accessId = null); - `Authentication not required`

** Check the access of $accessId, By default it check current route and return response in boolean value., (*12)

    YesAuthority::isPublicAccess('temp1');
    // true or false

Usage - Directives


@canAccess($accessId = null);

** Check the access, By default it check current route and return response in boolean value., (*13)

    @canAccess()
       // your logic here.
    @endAccess;

@canPublicAccess($accessId = null); - `Authentication not required`

** Check the public access, By default it check current route and return response in boolean value., (*14)

    @canPublicAccess()
       // your logic here.
    @endAccess;

The Versions

27/06 2018

dev-master

9999999-dev

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

27/06 2018

dev-2.x-dev

dev-2.x-dev

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

27/06 2018

v2.8.0

2.8.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

11/06 2018

v2.7.8

2.7.8.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

11/06 2018

v2.7.7

2.7.7.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

10/06 2018

v2.7.6

2.7.6.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

10/06 2018

v2.7.5

2.7.5.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

08/06 2018

v2.7.2

2.7.2.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

08/06 2018

v2.7.1

2.7.1.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

07/06 2018

v2.7.0

2.7.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

04/06 2018

v2.6.1

2.6.1.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

04/06 2018

v2.6.0

2.6.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

04/06 2018

v2.5.0

2.5.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

09/05 2018

v2.3.2

2.3.2.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

09/05 2018

v2.3.1

2.3.1.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

09/05 2018

v2.3.0

2.3.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

11/03 2018

2.1.8

2.1.8.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

23/10 2017

2.1.7

2.1.7.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

23/10 2017

2.1.5

2.1.5.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

23/10 2017

2.1.4

2.1.4.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

22/10 2017

2.1.3

2.1.3.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

22/10 2017

2.1.2

2.1.2.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

18/10 2017

2.1.1

2.1.1.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

18/10 2017

v2.1.0

2.1.0.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

17/10 2017

v2.0.7

2.0.7.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

09/10 2017

v2.0.6

2.0.6.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

22/09 2017

v2.0.5

2.0.5.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

02/08 2017

v2.0.4

2.0.4.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

01/08 2017

v2.0.3

2.0.3.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

31/07 2017

v2.0.2

2.0.2.0

YesAuthority - Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut
by Ravindra Lande
by Nikhil Bangre
by Ajay Pimpalkar

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

29/07 2017

v2.0.0

2.0.0.0

Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

29/07 2017

dev-1.x-dev

dev-1.x-dev

Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut

laravel authentication authorization acl security role laravel 5 cancan permission laravel 5.4 laravel 5.1 laravel 5.2 laravel 5.3 can ability authority allow deny routes authorization laravel routes authority laravel 5.5

27/07 2017

1.20.21

1.20.21.0

Laravel Routes Authorization Library

  Sources   Download

MIT

The Requires

 

by Vinod Raut - Yesteamtech