library psr7-permission
Permission Layer for Slim 3
geggleto/psr7-permission
Permission Layer for Slim 3
- Monday, November 16, 2015
- by geggleto
- Repository
- 1 Watchers
- 4 Stars
- 13 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 4 Versions
- 0 % Grown
psr7-permission
Configuration
This Middleware checks to see if a User has permission to access a specific resource., (*1)
The Middleware makes the following assumptions:
- That you load the middleware with all of the routes the system is applied to.
- That the user's permission table is loaded into the Requests 'permission' attribute [by default], (*2)
If a user attempts to access a resource they are not allowed an Exception is raised., (*3)
Usage
// In Slim 3
$permission = new Geggleto\Service\Permission($container['system_routes']);
// This will add the permission middleware to the entire site.
// This is not likely what you want since non-logged in users will not be able to access anything.
$app->add($permission);
dev-master
9999999-dev
Permission Layer for Slim 3
Sources
Download
MIT
The Requires
The Development Requires
middleware
framework
slim
0.1.2
0.1.2.0
Permission Layer for Slim 3
Sources
Download
MIT
The Requires
The Development Requires
middleware
framework
slim
0.1.0
0.1.0.0
Permission Layer for Slim 3
Sources
Download
MIT
The Requires
The Development Requires
middleware
framework
slim
0.0.1
0.0.1.0
Permission Layer for Slim 3
Sources
Download
MIT
The Requires
The Development Requires
middleware
framework
slim