Download the PHP package filagora/filagora-entitlements without Composer

On this page you can find all versions of the php package filagora/filagora-entitlements. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filagora-entitlements

Filagora Entitlements

Entitlement definitions, user and default grants, requests, a cached resolver and the authorization service for Filagora, as a Laravel 13 / Filament 5 plugin. An entitlement is a named permission such as forums.read; users hold them through grants, and everything else in Filagora asks "may this user do this?" through one service. Requires filagora/filagora-core.

0.x: the API may change between minor versions.

Install

Register both plugins on a Filament panel:

Publish the config if you want to change it: php artisan vendor:publish --tag=filagora-entitlements-config.

What it provides

Access control

Every screen is denied until the user holds the matching entitlement. Each screen is guarded by a Gate ability, and gates in the config maps the ability to the entitlement that opens it:

Gate ability Opens Default entitlement key
filagora.entitlements.manage Definitions, user grants, default grants, the user relation manager for grants filagora.entitlements.manage
filagora.entitlements.view The request queue and reviewing requests, the user relation manager for requests filagora.entitlements.view
filagora.settings.manage Core's settings screen filagora.settings.manage

A single wildcard grant, filagora.*, opens all of them. To use your own keys, change the right side of the map in config/filagora-entitlements.php:

Keys in the map are created as definitions by filagora:entitlements:sync.

Using it in your app

  1. Add the optional trait to your user model: use \Filagora\Entitlements\Concerns\HasEntitlements; (the relations to grants and requests, and hasEntitlement()). Filagora never alters your users table.
  2. Attach the relation managers to your own user resource: UserEntitlementsRelationManager and UserEntitlementRequestsRelationManager.
  3. Ask questions through the service:

    or Gate::allows('filagora.entitlements.manage') for the abilities above.

Extending

Configuration

Key Environment Default Meaning
cache_ttl_seconds FILAGORA_ENTITLEMENTS_CACHE_TTL 300 Upper bound on how long a user's resolved entitlements are cached (minimum 30). Changes made through the package take effect immediately regardless
gates the three above Gate ability to entitlement key

Testing

Tests run against a real MariaDB database named testing.

Licence

MIT. See LICENSE.


All versions of filagora-entitlements with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
filament/filament Version ^5.0
filagora/filagora-core Version ^0.2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package filagora/filagora-entitlements contains the following files

Loading the files please wait ...