Download the PHP package flightphp/permissions without Composer
On this page you can find all versions of the php package flightphp/permissions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flightphp/permissions
More information about flightphp/permissions
Files in flightphp/permissions
Package permissions
Short Description Library for managing permissions in Flight Applications
License MIT
Homepage https://docs.flightphp.com
Informations about the package permissions
Flight Permissions Plugin
Permissions are an important part to any application. Even in a RESTful API you'll need to check that the API key has permission to perform the action requested. In some cases it makes sense to handle authentication in a middleware, but in other cases, it's more helpful to have a standard set of permissions.
This library follows a CRUD based permissions systems. See basic example for example on how this is accomplished.
Basic Example
Let's assume you have a feature in your application that checks if a user is logged in. You can create a permissions object like this:
Then in a controller somewhere, you might have something like this.
You can also use this to track if they have permission to do something in your application. For instance, if your have a way that users can interact with posting on your software, you can check if they have permission to perform certain actions.
Then in a controller somewhere...
See how much fun this is? Let's install it and get started!
Installation
Simply install with Composer
Documentation
Head over to the documentation page to learn more about usage and how cool this thing is! :)
License
MIT